Skip to content

Commit

Permalink
Merge pull request #416 from shaunwarman/change-email-to-myaccount
Browse files Browse the repository at this point in the history
fix: move change email to my-account
  • Loading branch information
shaunwarman authored Oct 16, 2020
2 parents cec8fec + a68a846 commit e165ee0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion template/app/controllers/web/my-account.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ async function update(ctx) {
config.userFields.changeEmailNewAddress,
config.passportLocalMongoose.usernameField
]),
link: `${config.urls.web}/change-email/${
link: `${config.urls.web}/my-account/change-email/${
ctx.state.user[config.userFields.changeEmailToken]
}`
}
Expand Down
2 changes: 0 additions & 2 deletions template/routes/web/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ localeRouter
.post('/forgot-password', web.auth.forgotPassword)
.get('/reset-password/:token', render('reset-password'))
.post('/reset-password/:token', web.auth.resetPassword)
.get('/change-email/:token', render('change-email'))
.post('/change-email/:token', web.auth.changeEmail)
.get(
config.verifyRoute,
policies.ensureLoggedIn,
Expand Down
2 changes: 2 additions & 0 deletions template/routes/web/my-account.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ router.get('/', (ctx) => {
ctx.redirect(ctx.state.l('/my-account/profile'));
});
router.put('/', web.myAccount.update);
router.get('/change-email/:token', render('change-email'));
router.post('/change-email/:token', web.auth.changeEmail);
router.get('/profile', render('my-account/profile'));
router.put('/profile', web.myAccount.update);
router.delete('/security', web.myAccount.resetAPIToken);
Expand Down

0 comments on commit e165ee0

Please sign in to comment.