v3: misc fixes

This commit is contained in:
Matteo Pagliazzi
2016-05-15 14:20:20 +02:00
parent 164c024512
commit 3fbc156811
19 changed files with 33 additions and 48 deletions

View File

@@ -29,7 +29,7 @@ export function authWithHeaders (optional = false) {
if (user.auth.blocked) throw new NotAuthorized(res.t('accountSuspended', {userId: user._id}));
res.locals.user = user;
// TODO use either session/cookie or headers, not both
req.session.userId = user._id;
return next();
})