This commit is contained in:
omkieit 2024-09-09 22:39:58 +05:30
parent 50d695d2b9
commit 8015c67e47
1 changed files with 3 additions and 3 deletions

View File

@ -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",