Add missing variable def to User model

This commit is contained in:
Alex Holliday committed 2024-10-16 11:45:38 +08:00
1 parent 6753446387
commit 05dae6b060
1 file changed
+1 -1
+1 -1
View File
@@ -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;
}; };