diff --git a/website/src/controllers/api-v2/user.js b/website/src/controllers/api-v2/user.js index f1b0cd9ecc..bfe9662148 100644 --- a/website/src/controllers/api-v2/user.js +++ b/website/src/controllers/api-v2/user.js @@ -532,7 +532,7 @@ api.updateTag = function (req, res, next) { return res.status(404).json({err: i18n.t('messageTagNotFound', req.language)}); } - tag.name = req.body.tag; + tag.name = req.body.name; user.save(function (err, user) { if (err) return next(err); diff --git a/website/src/models/user.js b/website/src/models/user.js index d6d529ca9e..989af4a3eb 100644 --- a/website/src/models/user.js +++ b/website/src/models/user.js @@ -533,7 +533,7 @@ schema.plugin(baseModel, { 'invitations', 'balance', 'backer', 'contributor'], private: ['auth.local.hashed_password', 'auth.local.salt'], toJSONTransform: function userToJSON (plainObj, originalDoc) { - // doc.filters = {}; Not saved + plainObj.filters = {}; // TODO Not saved plainObj._tmp = originalDoc._tmp; // be sure to send down drop notifs TODO how to test? return plainObj;