mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
v3 adapt v2: fix updating and deleting tags
This commit is contained in:
@@ -532,7 +532,7 @@ api.updateTag = function (req, res, next) {
|
|||||||
return res.status(404).json({err: i18n.t('messageTagNotFound', req.language)});
|
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) {
|
user.save(function (err, user) {
|
||||||
if (err) return next(err);
|
if (err) return next(err);
|
||||||
|
|
||||||
|
|||||||
@@ -533,7 +533,7 @@ schema.plugin(baseModel, {
|
|||||||
'invitations', 'balance', 'backer', 'contributor'],
|
'invitations', 'balance', 'backer', 'contributor'],
|
||||||
private: ['auth.local.hashed_password', 'auth.local.salt'],
|
private: ['auth.local.hashed_password', 'auth.local.salt'],
|
||||||
toJSONTransform: function userToJSON (plainObj, originalDoc) {
|
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?
|
plainObj._tmp = originalDoc._tmp; // be sure to send down drop notifs TODO how to test?
|
||||||
|
|
||||||
return plainObj;
|
return plainObj;
|
||||||
|
|||||||
Reference in New Issue
Block a user