fix /r/:subreddit/search redis key

This commit is contained in:
teddit 2021-03-23 19:40:26 +01:00
parent 8e3afb71d9
commit 9e3173a62e

View File

@ -763,7 +763,7 @@ module.exports = (app, redis, fetch, RedditAPI) => {
nsfw = 'off' nsfw = 'off'
} }
let key = `search:${q}:${restrict_sr}:${sortby}:${past}:${after}:${before}:${nsfw}` let key = `search:${subreddit}:${q}:${restrict_sr}:${sortby}:${past}:${after}:${before}:${nsfw}`
redis.get(key, (error, json) => { redis.get(key, (error, json) => {
if(error) { if(error) {
console.error('Error getting the search key from redis.', error) console.error('Error getting the search key from redis.', error)