diff --git a/controllers/authController.js b/controllers/authController.js index 669a000..cf7852f 100644 --- a/controllers/authController.js +++ b/controllers/authController.js @@ -126,7 +126,7 @@ const verifyLoginOtp = async (req, res) => { }; const verifySignUpOtp = async (req, res) => { - const { otp, mobile } = req.body; + const { name, otp, mobile } = req.body; const params = { ClientId: process.env.COGNITO_APP_CLIENT_ID, @@ -139,6 +139,7 @@ const verifySignUpOtp = async (req, res) => { const command = new ConfirmSignUpCommand(params); const data = await cognito.send(command); const newUser = new User({ + name, mobile, }); await newUser.save(); diff --git a/controllers/products/decoratorController.js b/controllers/products/decoratorController.js index ca50385..5a7fe68 100644 --- a/controllers/products/decoratorController.js +++ b/controllers/products/decoratorController.js @@ -35,6 +35,7 @@ const createDecorator = async (req, res) => { const newDecorator = new Decorator({ name: req.body.name, id: req.body.id, + venId: req.body.venId, eventTypes: req.body.eventTypes, themesOffered: req.body.themesOffered, propSelection: req.body.propSelection, diff --git a/models/decoraters.js b/models/decoraters.js index b23a948..1ee177a 100644 --- a/models/decoraters.js +++ b/models/decoraters.js @@ -23,9 +23,15 @@ const decoratorSchema = Schema({ customDesignProcess: { type: String }, themeElements: { type: [String], default: [] }, - backdropOptions: { type: String, customisable: Boolean }, - stageDecorationOptions: { type: String, customisable: Boolean }, - propAndAccessorySelection: { type: String, customisable: Boolean }, + backdropOptions: { options: [String], customisable: { type: Boolean } }, + stageDecorationOptions: { + options: [String], + customisable: { type: Boolean }, + }, + propAndAccessorySelection: { + options: [String], + customisable: { type: Boolean }, + }, freeConsultation: { type: Boolean, default: false }, writtenThemeProposal: { type: Boolean, default: false },