Added docker compose, fixed all file paths, updated readme, fixed Async function bcrypt compare
This commit is contained in:
1 parent
51315bb8ed
commit
c8bcc59b52
10 files changed
+101
-36
No files matched your search
@@ -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