Skip to content

Commit c053e84

Browse files
author
shahriarsajeeb
committed
syntax mistake fixed in user model
1 parent e788b96 commit c053e84

File tree

6 files changed

+1
-2
lines changed

6 files changed

+1
-2
lines changed

.DS_Store

-2 KB
Binary file not shown.

backend/controller/user.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const jwt = require("jsonwebtoken");
1010
const sendMail = require("../utils/sendMail");
1111
const sendToken = require("../utils/jwtToken");
1212
const { isAuthenticated, isAdmin } = require("../middleware/auth");
13-
const user = require("../model/user");
1413

1514
router.post("/create-user", upload.single("file"), async (req, res, next) => {
1615
try {

backend/model/user.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const userSchema = new mongoose.Schema({
6161

6262
// Hash password
6363
userSchema.pre("save", async function (next){
64-
if(!this.isModifed("password")){
64+
if(!this.isModified("password")){
6565
next();
6666
}
6767

frontend/.DS_Store

-6 KB
Binary file not shown.

frontend/src/.DS_Store

-8 KB
Binary file not shown.

frontend/src/Assests/.DS_Store

-6 KB
Binary file not shown.

0 commit comments

Comments
 (0)