chore: remove broken endpoints (#45086)
These still exist, technically, but there's no render engine so they all generate errors instead of pages
This commit is contained in:
committed by
GitHub
parent
0a895dad47
commit
604e29c4bc
@ -14,36 +14,10 @@ module.exports = function (app) {
|
||||
router.get('/u/:email', unsubscribeDeprecated);
|
||||
router.get('/unsubscribe/:email', unsubscribeDeprecated);
|
||||
router.get('/ue/:unsubscribeId', unsubscribeById);
|
||||
router.get(
|
||||
'/the-fastest-web-page-on-the-internet',
|
||||
theFastestWebPageOnTheInternet
|
||||
);
|
||||
router.get('/unsubscribed/:unsubscribeId', unsubscribedWithId);
|
||||
router.get('/unsubscribed', unsubscribed);
|
||||
router.get('/resubscribe/:unsubscribeId', resubscribe);
|
||||
router.get('/nonprofits', nonprofits);
|
||||
router.get('/coding-bootcamp-cost-calculator', bootcampCalculator);
|
||||
|
||||
app.use(router);
|
||||
|
||||
function theFastestWebPageOnTheInternet(req, res) {
|
||||
res.render('resources/the-fastest-web-page-on-the-internet', {
|
||||
title: 'This is the fastest web page on the internet'
|
||||
});
|
||||
}
|
||||
|
||||
function bootcampCalculator(req, res) {
|
||||
res.render('resources/calculator', {
|
||||
title: 'Coding Bootcamp Cost Calculator'
|
||||
});
|
||||
}
|
||||
|
||||
function nonprofits(req, res) {
|
||||
res.render('resources/nonprofits', {
|
||||
title: 'Your Nonprofit Can Get Pro Bono Code'
|
||||
});
|
||||
}
|
||||
|
||||
function unsubscribeDeprecated(req, res) {
|
||||
req.flash(
|
||||
'info',
|
||||
@ -96,20 +70,6 @@ module.exports = function (app) {
|
||||
});
|
||||
}
|
||||
|
||||
function unsubscribed(req, res) {
|
||||
res.render('resources/unsubscribed', {
|
||||
title: 'You have been unsubscribed'
|
||||
});
|
||||
}
|
||||
|
||||
function unsubscribedWithId(req, res) {
|
||||
const { unsubscribeId } = req.params;
|
||||
return res.render('resources/unsubscribed', {
|
||||
title: 'You have been unsubscribed',
|
||||
unsubscribeId
|
||||
});
|
||||
}
|
||||
|
||||
function resubscribe(req, res, next) {
|
||||
const { unsubscribeId } = req.params;
|
||||
const { origin } = getRedirectParams(req);
|
||||
|
Reference in New Issue
Block a user