diff --git a/app/controllers/quarterlyWindowsConfiguration.controller.js b/app/controllers/quarterlyWindowsConfiguration.controller.js index 8712a4c..4596af3 100644 --- a/app/controllers/quarterlyWindowsConfiguration.controller.js +++ b/app/controllers/quarterlyWindowsConfiguration.controller.js @@ -7,22 +7,12 @@ const EstablishmentUser = db.EstablishmentUser; const { sendEmailService } = require("../services/email.service"); // Create new configuration + exports.createConfig = async (req, res) => { try { - const {survey_name, quarter, year, start_date, end_date } = req.body; + const {quarter, year, start_date, end_date } = req.body; - const surveyNameExists = await QuarterlyWindowsConfiguration.findOne({ - where: { survey_name, is_active: true } - }); - - if (surveyNameExists) { - return res.status(400).json({ - status: "failed", - message: `Survey Name '${survey_name}' already exists.` - }); - } - // find config const exists = await QuarterlyWindowsConfiguration.findOne({where: { quarter, year }});