mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-02-14 13:29:25 -06:00
Added docker compose, fixed all file paths, updated readme, fixed Async function bcrypt compare
This commit is contained in:
@@ -46,8 +46,9 @@ UserSchema.pre("save", async function (next) {
|
||||
next();
|
||||
});
|
||||
|
||||
UserSchema.methods.comparePassword = function (submittedPassword) {
|
||||
return bcrypt.compare(submittedPassword, this.password);
|
||||
UserSchema.methods.comparePassword = async function (submittedPassword) {
|
||||
res = await bcrypt.compare(submittedPassword, this.password);
|
||||
return res;
|
||||
};
|
||||
|
||||
module.exports = mongoose.model("User", UserSchema);
|
||||
|
||||
Reference in New Issue
Block a user