added 301 redirect for /trending

This commit is contained in:
bill bittner 2017-09-07 12:40:35 -07:00
parent a58ca6a167
commit 7a81d53c35

View file

@ -9,6 +9,9 @@ module.exports = (app) => {
res.status(200).render('about');
});
// route to display a list of the trending images
app.get('/trending', (req, res) => {
res.status(301).redirect('/popular');
});
app.get('/popular', (req, res) => {
const startDate = new Date();
startDate.setDate(startDate.getDate() - 1);