Answer the question
In order to leave comments, you need to log in
User.comparePassword is not a function, what should I do?
Displays
{
"message": "User.comparePassword is not a function"
}
UserSchema.methods.comparePasswords = async function (password) {
return await bcrypt.compare(password, this.password);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question