Components for user modification, email validation
This commit is contained in:
parent
01227bb28f
commit
99a3d7ff33
9 changed files with 193 additions and 3 deletions
|
|
@ -21,6 +21,13 @@ export default async (req: Request, res: Response) => {
|
|||
.json({ error: "Email address is not registered." });
|
||||
}
|
||||
|
||||
if (!user.isEmailValidated) {
|
||||
return res.status(403).json({
|
||||
error:
|
||||
"This email address has not yet been validated. Please check your email.",
|
||||
});
|
||||
}
|
||||
|
||||
if (!user.validPassword(req.body.password)) {
|
||||
return res
|
||||
.status(404)
|
||||
|
|
|
|||
Loading…
Reference in a new issue