diff --git a/src/api/models/user.model.js b/src/api/models/user.model.js index e80e6587..2930eccf 100644 --- a/src/api/models/user.model.js +++ b/src/api/models/user.model.js @@ -155,7 +155,7 @@ userSchema.statics = { isPublic: true, }; if (password) { - if (user && user.passwordMatches(password)) { + if (user && await user.passwordMatches(password)) { return { user, accessToken: user.token() }; } err.message = 'Incorrect email or password';