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:
committed by
mrugesh mohapatra
parent
487f7c8153
commit
238657d356
@ -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;
|
||||||
|
Reference in New Issue
Block a user