mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-27 03:58:02 -05:00
auth/email: Redirect on (un)successful registration
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
3ea64b2308
commit
dd63f789f7
1 changed files with 2 additions and 2 deletions
|
@ -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.')
|
||||
|
|
Loading…
Reference in a new issue