Fix 401 error in embeds

pull/3388/head
Chocobozzz 2020-12-01 10:43:13 +01:00
parent cf3e0d69a6
commit a7299d9d85
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 4 additions and 5 deletions

View File

@ -125,10 +125,9 @@ export class PeerTubeEmbed {
this.setHeadersFromTokens()
resolve()
}).catch((refreshTokenError: any) => {
reject(refreshTokenError)
})
.catch((refreshTokenError: any) => {
reject(refreshTokenError)
})
})
return refreshingTokenPromise
@ -339,7 +338,7 @@ export class PeerTubeEmbed {
try {
playlistResponse = await playlistPromise
isResponseOk = true
isResponseOk = playlistResponse.status === 200
} catch (err) {
console.error(err)
isResponseOk = false
@ -368,7 +367,7 @@ export class PeerTubeEmbed {
try {
videoResponse = await videoPromise
isResponseOk = true
isResponseOk = videoResponse.status === 200
} catch (err) {
console.error(err)