From 6cd00468e46339b581b7e13f2a45be91911a7cca Mon Sep 17 00:00:00 2001 From: teddit Date: Sun, 31 Jan 2021 16:43:07 +0100 Subject: [PATCH] support short gallery urls --- routes.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/routes.js b/routes.js index bc4b978..7866f4f 100644 --- a/routes.js +++ b/routes.js @@ -68,6 +68,10 @@ module.exports = (app, redis, fetch, RedditAPI) => { app.get('/privacy', (req, res, next) => { return res.render('privacypolicy', { user_preferences: req.cookies }) }) + + app.get('/gallery/:id', (req, res, next) => { + return res.redirect(`/comments/${req.params.id}`) + }) app.get('/subreddits/:sort?', (req, res, next) => { let q = req.query.q