use node 4, npm 3, mongoose 4 and express 4

This commit is contained in:
Matteo Pagliazzi
2015-11-01 12:39:11 +01:00
parent f1dbe1b51d
commit b21df9edb3
4 changed files with 57 additions and 34 deletions
@@ -15,7 +15,7 @@ api.unsubscribe = function(req, res, next){
$set: {'preferences.emailNotifications.unsubscribeFromAll': true}
}, {multi: false}, function(err, updateRes){
if(err) return next(err);
if(updateRes !== 1) return res.json(404, {err: 'User not found'});
if(updateRes.n !== 1) return res.json(404, {err: 'User not found'});
res.send('<h1>' + i18n.t('unsubscribedSuccessfully', null, req.language) + '</h1>' + i18n.t('unsubscribedTextUsers', null, req.language));
});