v3 adapt v2: fix updating and deleting tags

This commit is contained in:
Matteo Pagliazzi
2016-04-10 19:26:32 +02:00
parent ad3c8f0ad2
commit 01a2afc12f
2 changed files with 2 additions and 2 deletions

View File

@@ -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);

View File

@@ -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;