From c7f08468973c396e74bce865c81111dd38f94c87 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 10 Dec 2025 14:47:20 +0530 Subject: [PATCH] Remove validation for survey name --- .../quarterlyWindowsConfiguration.controller.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) 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 }});