From 1628c28720e04a21e4492ac233800a0f5140b82f Mon Sep 17 00:00:00 2001 From: Ashrockzzz2003 Date: Wed, 16 Oct 2024 11:20:31 +0530 Subject: [PATCH] Include student name and email in response of gate entry and exit. --- controller/adminController.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/controller/adminController.js b/controller/adminController.js index 1ce4850..a3cfc03 100644 --- a/controller/adminController.js +++ b/controller/adminController.js @@ -2092,7 +2092,7 @@ module.exports = { if (!(regGroup.length > 0)) { return res.status(400).send({ - "MESSAGE": "Student did not register for any event. Entry not allowed." + "MESSAGE": `Entry not allowed.\nName: ${check[0].studentFullName}\nEmail: ${check[0].studentEmail}\nStudent did not register for any event.` }); } @@ -2107,7 +2107,7 @@ module.exports = { if (check2.length != 0) { return res.status(400).send({ - "MESSAGE": "Malpractice: Student Didn't Mark Exit!" + "MESSAGE": `Malpractice\nName: ${check[0].studentFullName}\nEmail: ${check[0].studentEmail}\nStudent Didn't Mark Exit!` }); } @@ -2124,7 +2124,7 @@ module.exports = { await db_connection.commit(); return res.status(200).send({ - "MESSAGE": "Successfully Marked Gate Entry." + "MESSAGE": `Successfully Marked Gate Entry.\nName: ${check[0].studentFullName}\nEmail: ${check[0].studentEmail}` }); } @@ -2242,7 +2242,7 @@ module.exports = { if (check2.length != 0) { return res.status(400).send({ - "MESSAGE": "Malpractice: Student Didn't Mark Entry!" + "MESSAGE": `Malpractice\nName:${check[0].studentFullName}\nEmail:${check[0].studentEmail}\nStudent Didn't Mark Entry!` }); } @@ -2254,7 +2254,7 @@ module.exports = { if (check3.length == 0) { return res.status(400).send({ - "MESSAGE": "Malpractice: Student Didn't Mark Entry!" + "MESSAGE": `Malpractice\nName:${check[0].studentFullName}\nEmail:${check[0].studentEmail}\nStudent Didn't Mark Entry!` }); } @@ -2266,7 +2266,7 @@ module.exports = { if (check4.length == 0) { return res.status(400).send({ - "MESSAGE": "Malpractice: Student Didn't Mark Exit!" + "MESSAGE": `Malpractice\nName:${check[0].studentFullName}\nEmail:${check[0].studentEmail}\nStudent Didn't Mark Entry!` }); } @@ -2283,7 +2283,7 @@ module.exports = { await db_connection.commit(); return res.status(200).send({ - "MESSAGE": "Successfully Marked Gate Exit." + "MESSAGE": `Name:${check[0].studentFullName}\nEmail:${check[0].studentEmail}\nSuccessfully Marked Gate Exit.` }); }