From 833d3b32cd3b5bc44dc49fdb8e6f739f48fe56fd Mon Sep 17 00:00:00 2001 From: juzz Date: Tue, 19 Jan 2021 21:21:13 +1100 Subject: [PATCH] fix short comment URLs #114 --- routes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes.js b/routes.js index 37b5a5d..2764ce2 100644 --- a/routes.js +++ b/routes.js @@ -854,7 +854,7 @@ module.exports = (app, redis, fetch, RedditAPI) => { }) }) - app.get('/r/:subreddit/comments/:id/:snippet/:comment_id?', (req, res, next) => { + app.get('/r/:subreddit/comments/:id/:snippet?/:comment_id?', (req, res, next) => { let subreddit = req.params.subreddit let id = req.params.id let snippet = encodeURIComponent(req.params.snippet)