mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-15 16:32:16 +00:00
set wasmodified to true if missing req.query._v
This commit is contained in:
parent
8540e2f59b
commit
6444d5796e
1 changed files with 2 additions and 1 deletions
|
|
@ -37,7 +37,8 @@ api.auth = function(req, res, next) {
|
|||
if (_.isEmpty(user)) {
|
||||
return res.json(401, NO_USER_FOUND);
|
||||
}
|
||||
res.locals.wasModified = +user._v !== +req.query._v;
|
||||
|
||||
res.locals.wasModified = (req.query._v ? +user._v !== +req.query._v : true);
|
||||
res.locals.user = user;
|
||||
req.session.userId = user._id;
|
||||
return next();
|
||||
|
|
|
|||
Loading…
Reference in a new issue