diff --git a/ef-api/controllers/user.js b/ef-api/controllers/user.js index 55c19b2..8379e57 100644 --- a/ef-api/controllers/user.js +++ b/ef-api/controllers/user.js @@ -101,9 +101,9 @@ export const signin = async (req, res) => { if (!isPasswordCorrect) return res.status(400).json({ message: "Invalid credentials" }); - // if (!oldUser.verified) { - // return res.status(401).json({ message: "User is not verified" }); - // } + if (!oldUser.verified) { + return res.status(401).json({ message: "User is not verified" }); + } const token = jwt.sign({ email: oldUser.email, id: oldUser._id }, secret, { expiresIn: "8h",