reddit: roll back headers logics change, clean up

This commit is contained in:
wukko 2024-05-03 14:07:26 +06:00
parent 71890b6a31
commit a73ffa3571
No known key found for this signature in database
GPG Key ID: 3E30B3F26C7B4AA2

View File

@ -59,10 +59,7 @@ export default async function(obj) {
let data = await fetch( let data = await fetch(
url, { url, {
headers: { headers: accessToken && { authorization: `Bearer ${accessToken}` }
authorization: `Bearer ${accessToken}`,
accessToken
}
} }
).then(r => r.json() ).catch(() => {}); ).then(r => r.json() ).catch(() => {});
@ -103,9 +100,7 @@ export default async function(obj) {
if (Number(r.status) === 200) { if (Number(r.status) === 200) {
audio = true audio = true
} }
}).catch(() => { }).catch(() => {})
audio = false
})
} }
let id = video.split('/')[3]; let id = video.split('/')[3];