Add missing variable def to User model
This commit is contained in:
1 parent
6753446387
commit
05dae6b060
1 file changed
+1
-1
@@ -74,7 +74,7 @@ UserSchema.pre("findOneAndUpdate", async function (next) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
UserSchema.methods.comparePassword = async function (submittedPassword) {
|
UserSchema.methods.comparePassword = async function (submittedPassword) {
|
||||||
res = await bcrypt.compare(submittedPassword, this.password);
|
const res = await bcrypt.compare(submittedPassword, this.password);
|
||||||
return res;
|
return res;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user