fix(views): update static email update views

This commit is contained in:
Mrugesh Mohapatra
2018-05-26 00:31:21 +05:30
parent 59f700b110
commit 12b2c556ec
3 changed files with 3 additions and 11 deletions

View File

@ -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) => {

View File

@ -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;
}
}

View File

@ -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)