Skip to content

Commit

Permalink
fixed(accounts): callback being called too soon
Browse files Browse the repository at this point in the history
  • Loading branch information
polonel committed Sep 19, 2018
1 parent eec6469 commit eeaf905
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/models/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,8 @@ userSchema.pre('save', function(next) {
return next();
});
});
}

return next();
} else
return next();
});

userSchema.methods.addAccessToken = function(callback) {
Expand Down

0 comments on commit eeaf905

Please sign in to comment.