Skip to content

Commit 4e9d50a

Browse files
committed
Bug:Organzier Model Account Status
1 parent 03f6f5f commit 4e9d50a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

controllers/ValidationController.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const organizerSchema = Joi.object({
3131
contact: Joi.string(),
3232
accountLevel: Joi.number(),
3333
bio: Joi.string(),
34-
accountStatus: Joi.string().default("active"),
34+
accountStatus: Joi.string().default("inactive"),
3535
payment: Joi.array().items(
3636
Joi.object({
3737
name: Joi.string().required(),

models/organizer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const organizerSchema = new Schema(
1111
thumbnail: { type: String },
1212
contact: { type: String },
1313
accountLevel: { type: Number },
14-
accountStatus: { type: String, default: "active" },
14+
accountStatus: { type: String, default: "inactive" },
1515
bio: { type: String },
1616
role: { type: String, default: role.organzier },
1717
isVerify: { type: Boolean, default: false },

services/registerServices.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ const verification = async (req, res) => {
138138
(await Organizer.findOne({ _id: req.params.userId })) ||
139139
(await Admin.findOne({ _id: req.params.userId }));
140140
if (!user) return res.status(400).send("Invalid link");
141-
await Organizer.updateOne({ _id: req.params.userId }, { $set: { isVerify: true } });
142-
await Admin.updateOne({ _id: req.params.userId }, { $set: { isVerify: true } });
141+
await Organizer.updateOne({ _id: req.params.userId }, { $set: { isVerify: true, accountStatus:'active' } });
142+
await Admin.updateOne({ _id: req.params.userId }, { $set: { isVerify: true ,accountStatus:'active'} });
143143
res.send({ message: "Email Verified Successfully", success: true });
144144
} catch (error) {
145145
console.log(error);

0 commit comments

Comments
 (0)