fixed problem with then catch chain (Promise)...
This commit is contained in:
@@ -102,7 +102,7 @@ UserSchema.methods.generateAuthToken = function (req) {
|
||||
|
||||
return user.save()
|
||||
.then(() => {
|
||||
console.log("TOKEN CREATO IN LOGIN : " + token)
|
||||
console.log("TOKEN CREATO IN LOGIN : " + token);
|
||||
return token;
|
||||
})
|
||||
.catch(err => {
|
||||
|
||||
Reference in New Issue
Block a user