diff options
Diffstat (limited to 'src/server/authentication')
-rw-r--r-- | src/server/authentication/controllers/user.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/server/authentication/controllers/user.ts b/src/server/authentication/controllers/user.ts index 554781409..5ff44bda1 100644 --- a/src/server/authentication/controllers/user.ts +++ b/src/server/authentication/controllers/user.ts @@ -29,7 +29,8 @@ export let getSignup = (req: Request, res: Response) => { return res.redirect("/home"); } res.render("signup.pug", { - title: "Sign Up" + title: "Sign Up", + errors: req.flash("Unable to facilitate sign up. Please try again.") }); }; @@ -48,8 +49,10 @@ export let postSignup = (req: Request, res: Response, next: NextFunction) => { const errors = req.validationErrors(); if (errors) { - req.flash("errors", "Unable to facilitate sign up. Please try again."); - console.log(errors.toString()); + res.render("signup.pug", { + title: "Sign Up", + errors: req.flash("Unable to facilitate sign up. Please try again.") + }); return res.redirect("/signup"); } |