Skip to content

Commit

Permalink
Merge pull request #63 from Killerrekt/master
Browse files Browse the repository at this point in the history
removed comment on email list
  • Loading branch information
aditansh authored Sep 24, 2023
2 parents 5e64eca + 30657e2 commit e0a1aa1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/controllers/authController.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ const authController = {
create: async (req, res) => {
try {
const { name, regNo, email } = req.body;
// const emailList = allowedEmailsData.allowedEmails;
// if (!emailList.includes(email)) {
// return res.status(400).json({ error:"User is not registered" });
// }
const emailList = allowedEmailsData.allowedEmails;
if (!emailList.includes(email)) {
return res.status(400).json({ error:"User is not registered" });
}
const user_exists = await User.findOne({ $or: [{ regNo }, { email }] });
if (user_exists) {
return res.status(400).json({
Expand Down

0 comments on commit e0a1aa1

Please sign in to comment.