Merge pull request #729 from bluewave-labs/fix/user-index

Initialize User model to creat index
This commit is contained in:
Alexander Holliday authored and GitHub committed 2024-08-26 17:59:55 -07:00
commit da0c736a32
1 file changed
+6
+6
View File
@@ -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);