{
"message": "User.comparePassword is not a function"
}
UserSchema.methods.comparePasswords = async function (password) {
return await bcrypt.compare(password, this.password);
}
"User.comparePassword is not a function"
UserSchema.methods.comparePasswords =