Skip to content

Commit

Permalink
Merge pull request #63 from Ashrockzzz2003/ashwin
Browse files Browse the repository at this point in the history
Include student name and email in responses of gate entry exit for a better experience.
  • Loading branch information
Ashrockzzz2003 authored Oct 16, 2024
2 parents 1f6358c + cdd2674 commit b68d5a7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions controller/adminController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.`
});
}

Expand All @@ -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!`
});
}

Expand All @@ -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}`
});
}

Expand Down Expand Up @@ -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!`
});
}

Expand All @@ -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!`
});
}

Expand All @@ -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 Exit!`
});
}

Expand All @@ -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.`
});
}

Expand Down

0 comments on commit b68d5a7

Please sign in to comment.