fix(points): Assign external user points when validated (#17228)

Trying to emulate ` component-passport`.

There has to be a reason why we don't do this in the user service.
This commit is contained in:
Stuart Taylor
2018-05-24 16:58:00 +01:00
committed by mrugesh mohapatra
parent 487f7c8153
commit 238657d356

View File

@ -52,6 +52,7 @@ export default () => function authorizeByJWT(req, res, next) {
return User.findById(userId) return User.findById(userId)
.then(user => { .then(user => {
if (user) { if (user) {
user.points = user.progressTimestamps.length;
req.user = user; req.user = user;
} }
return; return;