Skip to content

Commit 5411b3b

Browse files
committed
Removed eventsCreated array from user schema
1 parent 9031c6e commit 5411b3b

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
"mongoose": "^5.10.5",
2525
"morgan": "^1.10.0",
2626
"multer": "^1.4.2",
27+
"nodemailer": "^6.4.16",
2728
"react-helmet": "^6.1.0",
28-
"nodemailer": "^6.4.11",
2929
"validator": "^13.1.1"
3030
}
3131
}

src/models/userModel.js

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ const userSchema = new mongoose.Schema({
2828
required: true,
2929
trim: true,
3030
},
31-
eventsCreated: [{ type: String, unique: true, required: true }],
3231
});
3332

3433
userSchema.pre("save", async function (next) {

src/routers/userRouter.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ router.post("/register", async (req, res) => {
2323
if (password !== passwordCheck) {
2424
return res.status(400).json({ msg: "Passwords do not match" });
2525
}
26-
26+
2727
const existingUser = await User.findOne({ username });
2828
if (existingUser) {
2929
return res

0 commit comments

Comments
 (0)