From dd63f789f7fde7ec09aea25bc4a2927220f06963 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Mon, 13 Apr 2020 19:49:12 +0200 Subject: [PATCH] auth/email: Redirect on (un)successful registration Signed-off-by: David Mehren --- lib/web/auth/email/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/web/auth/email/index.ts b/lib/web/auth/email/index.ts index c28f0f819..e153c9fc4 100644 --- a/lib/web/auth/email/index.ts +++ b/lib/web/auth/email/index.ts @@ -59,11 +59,11 @@ export const EmailMiddleware: AuthMiddleware = { if (created) { logger.debug('user registered: ' + user.id) req.flash('info', "You've successfully registered, please signin.") - return + return res.redirect(config.serverURL + '/') } else { logger.debug('user found: ' + user.id) req.flash('error', 'This email has been used, please try another one.') - return + return res.redirect(config.serverURL + '/') } } req.flash('error', 'Failed to register your account, please try again.')