From cbbeafb8a0c53ddea92684021ead9bc08fa75d37 Mon Sep 17 00:00:00 2001 From: Sam Wilkins Date: Sun, 24 Feb 2019 16:03:38 -0500 Subject: ui tweaks --- src/server/authentication/controllers/user.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/server/authentication/controllers/user.ts') 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"); } -- cgit v1.2.3-70-g09d2