chore: commit lint fixes for the api
This commit is contained in:
committed by
mrugesh mohapatra
parent
010fa63e76
commit
07266b7e43
@ -69,15 +69,15 @@ export default () => function authorizeByJWT(req, res, next) {
|
||||
if (!req.user) {
|
||||
const User = loopback.getModelByType('User');
|
||||
return User.findById(userId)
|
||||
.then(user => {
|
||||
if (user) {
|
||||
user.points = user.progressTimestamps.length;
|
||||
req.user = user;
|
||||
}
|
||||
return;
|
||||
})
|
||||
.then(next)
|
||||
.catch(next);
|
||||
.then(user => {
|
||||
if (user) {
|
||||
user.points = user.progressTimestamps.length;
|
||||
req.user = user;
|
||||
}
|
||||
return;
|
||||
})
|
||||
.then(next)
|
||||
.catch(next);
|
||||
} else {
|
||||
return next();
|
||||
}
|
||||
|
Reference in New Issue
Block a user