From fae146f88436424f69223056c2836131c883b275 Mon Sep 17 00:00:00 2001 From: Gowtham M Date: Thu, 23 Oct 2025 10:33:04 +0530 Subject: [PATCH] login merged for both user : GWM --- app/controllers/auth.controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/auth.controller.js b/app/controllers/auth.controller.js index e847117..3e32d46 100644 --- a/app/controllers/auth.controller.js +++ b/app/controllers/auth.controller.js @@ -30,11 +30,11 @@ exports.login = async (req, res) => { try { const { email, password } = req.body; - userRole = 'Admin' + userRole = 'EstablishmentUser' userData = await EstablishmentUser.findOne({ where: { email } }); if (!userData) { userData = await User.findOne({ where: { email } }); - userRole = 'EstablishmentUser' + userRole = 'Admin' if (!userData) res.status(404).send({'status':"failed",'message':"User not found",'data': ""}); }