Merge pull request 'fix short comment URLs #114' (#117) from juzz/teddit:questionmark into main

Reviewed-on: https://codeberg.org/teddit/teddit/pulls/117
This commit is contained in:
teddit 2021-01-22 18:38:22 +01:00
commit f38fc457f4
1 changed files with 1 additions and 1 deletions

View File

@ -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)