comment out the moderators fetching

This commit is contained in:
teddit 2021-06-18 22:44:31 +02:00
parent 791014b661
commit 95f7ebb4be
1 changed files with 11 additions and 0 deletions

View File

@ -47,6 +47,16 @@ module.exports = function() {
if(config.use_reddit_oauth) {
moderators_url = `https://oauth.reddit.com/r/${subreddit}/about/moderators`
}
resolve(returnRelevantKeys(json))
/*
* The following code is commented out because Reddit doesn't
* anymore support fetching moderators for subreddits
* when not logged in.
* This might change in the future though.
* https://codeberg.org/teddit/teddit/issues/207
*/
/*
fetch(encodeURI(moderators_url), redditApiGETHeaders())
.then(mod_result => {
if(mod_result.status === 200) {
@ -72,6 +82,7 @@ module.exports = function() {
console.error('Error fetching moderators.', error)
resolve(returnRelevantKeys(json))
})
*/
}
})
})