mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-03 08:21:07 +00:00
return filters only for api v2
This commit is contained in:
parent
01a2afc12f
commit
2f4f62f342
1 changed files with 2 additions and 1 deletions
|
|
@ -533,7 +533,7 @@ schema.plugin(baseModel, {
|
|||
'invitations', 'balance', 'backer', 'contributor'],
|
||||
private: ['auth.local.hashed_password', 'auth.local.salt'],
|
||||
toJSONTransform: function userToJSON (plainObj, originalDoc) {
|
||||
plainObj.filters = {}; // TODO Not saved
|
||||
// plainObj.filters = {}; TODO Not saved
|
||||
plainObj._tmp = originalDoc._tmp; // be sure to send down drop notifs TODO how to test?
|
||||
|
||||
return plainObj;
|
||||
|
|
@ -753,6 +753,7 @@ schema.methods.getTasks = function getUserTasks () {
|
|||
// Given user and an array of tasks, return an API compatible user + tasks obj
|
||||
schema.methods.addTasksToUser = function addTasksToUser (tasks) {
|
||||
let obj = this.toJSON();
|
||||
obj.filters = {};
|
||||
|
||||
obj.tags = obj.tags.map(tag => {
|
||||
return {
|
||||
|
|
|
|||
Loading…
Reference in a new issue