mirror of
https://codeberg.org/tacerus/teddit.git
synced 2025-01-09 04:42:35 +01:00
don't fetch sidebar for multireddit urls
This commit is contained in:
parent
8336a3d424
commit
5e33387e5b
@ -2,6 +2,7 @@ module.exports = function() {
|
||||
this.processSubredditSidebar = (subreddit, redis, fetch, RedditAPI) => {
|
||||
return new Promise(resolve => {
|
||||
(async () => {
|
||||
if(subreddit && !subreddit.includes('+')) {
|
||||
let key = `${subreddit}:sidebar`
|
||||
redis.get(key, (error, json) => {
|
||||
if(error) {
|
||||
@ -58,6 +59,9 @@ module.exports = function() {
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
resolve(null)
|
||||
}
|
||||
})()
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user