From 15f8be4ca10e99819630d67c64e66cfe27b896b8 Mon Sep 17 00:00:00 2001 From: Amalesh Arivanan Date: Tue, 31 Mar 2026 10:28:12 +0530 Subject: [PATCH 1/2] add(deleteTeams): Checking the working --- src/controllers/teamController.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/controllers/teamController.js b/src/controllers/teamController.js index 4e473b9dd..74d1f9925 100644 --- a/src/controllers/teamController.js +++ b/src/controllers/teamController.js @@ -141,9 +141,11 @@ const teamcontroller = function (Team) { Promise.all([removeteamfromprofile, deleteteam]) .then( + console.log('Promise.all success:', result); res.status(200).send({ message: 'Team successfully deleted and user profiles updated' }), ) .catch((catchError) => { + console.log('Promise.all failed:', catchError); Logger.logException(error, null, `teamId: ${teamId}`); res.status(400).send({ error: catchError }); }); From 4bbdbf3aed1cbad8acff1684c8e0a833ed4098a1 Mon Sep 17 00:00:00 2001 From: Amalesh Arivanan Date: Tue, 31 Mar 2026 12:17:46 +0530 Subject: [PATCH 2/2] add(deleteTeams): Checking the working of Delete Teams --- src/controllers/teamController.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controllers/teamController.js b/src/controllers/teamController.js index 74d1f9925..7a5033c07 100644 --- a/src/controllers/teamController.js +++ b/src/controllers/teamController.js @@ -140,10 +140,10 @@ const teamcontroller = function (Team) { const deleteteam = record.remove(); Promise.all([removeteamfromprofile, deleteteam]) - .then( + .then((result) => { console.log('Promise.all success:', result); - res.status(200).send({ message: 'Team successfully deleted and user profiles updated' }), - ) + res.status(200).send({ message: 'Team successfully deleted and user profiles updated' }); + }) .catch((catchError) => { console.log('Promise.all failed:', catchError); Logger.logException(error, null, `teamId: ${teamId}`);