Merge branch 'feature/email-update-logic' of https://github.com/raisedadead/FreeCodeCamp into raisedadead-feature/email-update-logic
This commit is contained in:
@@ -149,6 +149,7 @@ module.exports = function(app) {
|
||||
router.get('/email-signup', getEmailSignup);
|
||||
router.get('/email-signin', getEmailSignin);
|
||||
router.get('/deprecated-signin', getDepSignin);
|
||||
router.get('/email-update', getUpdateEmail);
|
||||
router.get(
|
||||
'/toggle-lockdown-mode',
|
||||
sendNonUserToMap,
|
||||
@@ -226,6 +227,7 @@ module.exports = function(app) {
|
||||
res.redirect('/');
|
||||
}
|
||||
|
||||
|
||||
function getDepSignin(req, res) {
|
||||
if (req.user) {
|
||||
return res.redirect('/');
|
||||
@@ -235,6 +237,15 @@ module.exports = function(app) {
|
||||
});
|
||||
}
|
||||
|
||||
function getUpdateEmail(req, res) {
|
||||
if (!req.user) {
|
||||
return res.redirect('/');
|
||||
}
|
||||
return res.render('account/email-update', {
|
||||
title: 'Update your Email'
|
||||
});
|
||||
}
|
||||
|
||||
function getEmailSignin(req, res) {
|
||||
if (req.user) {
|
||||
return res.redirect('/');
|
||||
|
Reference in New Issue
Block a user