mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
v3: fix iap url
This commit is contained in:
@@ -60,6 +60,9 @@ module.exports = function baseModel (schema, options = {}) {
|
||||
objectPath.del(plainObj, fieldPath);
|
||||
});
|
||||
|
||||
// Always return `id`
|
||||
if (!plainObj.id && plainObj._id) plainObj.id = plainObj._id;
|
||||
|
||||
// Allow an additional toJSON transform function to be used
|
||||
return options.toJSONTransform ? options.toJSONTransform(plainObj, doc) : plainObj;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user