mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-01-18 07:39:54 -06:00
Initialize User model to creat index
This commit is contained in:
@@ -70,4 +70,10 @@ UserSchema.methods.comparePassword = async function (submittedPassword) {
|
||||
return res;
|
||||
};
|
||||
|
||||
const User = mongoose.model("User", UserSchema);
|
||||
|
||||
User.init().then(() => {
|
||||
console.log("User model initialized");
|
||||
});
|
||||
|
||||
module.exports = mongoose.model("User", UserSchema);
|
||||
|
||||
Reference in New Issue
Block a user