mirror of
https://github.com/imputnet/cobalt.git
synced 2025-07-17 18:58:33 +00:00
reddit: roll back headers logics change, clean up
This commit is contained in:
parent
71890b6a31
commit
a73ffa3571
@ -59,10 +59,7 @@ export default async function(obj) {
|
||||
|
||||
let data = await fetch(
|
||||
url, {
|
||||
headers: {
|
||||
authorization: `Bearer ${accessToken}`,
|
||||
accessToken
|
||||
}
|
||||
headers: accessToken && { authorization: `Bearer ${accessToken}` }
|
||||
}
|
||||
).then(r => r.json() ).catch(() => {});
|
||||
|
||||
@ -103,9 +100,7 @@ export default async function(obj) {
|
||||
if (Number(r.status) === 200) {
|
||||
audio = true
|
||||
}
|
||||
}).catch(() => {
|
||||
audio = false
|
||||
})
|
||||
}).catch(() => {})
|
||||
}
|
||||
|
||||
let id = video.split('/')[3];
|
||||
|
Loading…
Reference in New Issue
Block a user