pass pref_quarantine_optin-cookie to get quarantined subreddits (fixes #224)

This commit is contained in:
teddit 2021-08-18 22:07:29 +02:00
parent 9c1a8edd74
commit 2cb5a5e45a
1 changed files with 5 additions and 2 deletions

View File

@ -73,12 +73,15 @@ module.exports = function(fetch) {
})
}
this.redditApiGETHeaders = function() {
let cookies = '_options=%7B%22pref_quarantine_optin%22%3A%20true%7D'
if(!config.use_reddit_oauth)
return { method: 'GET' }
return { headers: { cookie: cookies }, method: 'GET' }
return {
headers: {
Authorization: `Bearer ${reddit_access_token}`
Authorization: `Bearer ${reddit_access_token}`,
cookie: cookies
},
method: 'GET'
}