fix(views): update static email update views
This commit is contained in:
@ -38,14 +38,6 @@ module.exports = function enableAuthentication(app) {
|
||||
ifUserRedirect,
|
||||
(req, res) => res.redirect(301, '/auth/auth0'));
|
||||
|
||||
router.get(
|
||||
'/update-email',
|
||||
ifNoUserRedirectHome,
|
||||
(req, res) => res.render('account/update-email', {
|
||||
title: 'Update your email'
|
||||
})
|
||||
);
|
||||
|
||||
router.get('/signout', (req, res) => {
|
||||
req.logout();
|
||||
req.session.destroy( (err) => {
|
||||
|
@ -4,7 +4,7 @@ const ALLOWED_METHODS = ['GET'];
|
||||
const EXCLUDED_PATHS = [
|
||||
'/api/flyers/findOne',
|
||||
'/signout',
|
||||
'/update-email'
|
||||
'/settings/update-email'
|
||||
];
|
||||
|
||||
export default function emailNotVerifiedNotice() {
|
||||
@ -23,7 +23,7 @@ export default function emailNotVerifiedNotice() {
|
||||
confirm.
|
||||
`
|
||||
);
|
||||
res.redirect('/update-email');
|
||||
res.redirect('/settings/update-email');
|
||||
return next;
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ block content
|
||||
span.ion-close-circled#flash-close
|
||||
#flash-content
|
||||
h2.text-center Update your email address here:
|
||||
form.form-horizontal.update-email(method='POST', action='/api/users/#{user.id}/update-email', name="updateEmailForm")
|
||||
form.form-horizontal.update-email(method='POST', action='/update-my-email', name="updateEmailForm")
|
||||
.row
|
||||
.col-sm-6.col-sm-offset-3
|
||||
input(type='hidden', name='_csrf', value=_csrf)
|
||||
|
Reference in New Issue
Block a user