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