Move commit to separate router
This commit is contained in:
15
server/boot/commit.js
Normal file
15
server/boot/commit.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
export default function commit(app) {
|
||||||
|
const router = app.loopback.Router();
|
||||||
|
router.get(
|
||||||
|
'/commit',
|
||||||
|
commitToNonprofit
|
||||||
|
);
|
||||||
|
|
||||||
|
app.use(router);
|
||||||
|
|
||||||
|
function commitToNonprofit(req, res) {
|
||||||
|
res.render('commit/', {
|
||||||
|
title: 'Commit to a nonprofit. Commit to your goal.'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -80,10 +80,6 @@ module.exports = function(app) {
|
|||||||
router.post('/reset-password', postReset);
|
router.post('/reset-password', postReset);
|
||||||
router.get('/email-signup', getEmailSignup);
|
router.get('/email-signup', getEmailSignup);
|
||||||
router.get('/email-signin', getEmailSignin);
|
router.get('/email-signin', getEmailSignin);
|
||||||
router.get(
|
|
||||||
'/commit',
|
|
||||||
commitToNonprofit
|
|
||||||
);
|
|
||||||
router.get(
|
router.get(
|
||||||
'/toggle-lockdown-mode',
|
'/toggle-lockdown-mode',
|
||||||
sendNonUserToMap,
|
sendNonUserToMap,
|
||||||
@ -126,12 +122,6 @@ module.exports = function(app) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function commitToNonprofit(req, res) {
|
|
||||||
res.render('account/commit', {
|
|
||||||
title: 'Commit to a nonprofit. Commit to your goal.'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function signout(req, res) {
|
function signout(req, res) {
|
||||||
req.logout();
|
req.logout();
|
||||||
res.redirect('/');
|
res.redirect('/');
|
||||||
|
Reference in New Issue
Block a user