mirror of https://github.com/Chocobozzz/PeerTube
Fix 401 error in embeds
parent
cf3e0d69a6
commit
a7299d9d85
|
@ -125,10 +125,9 @@ export class PeerTubeEmbed {
|
||||||
this.setHeadersFromTokens()
|
this.setHeadersFromTokens()
|
||||||
|
|
||||||
resolve()
|
resolve()
|
||||||
|
}).catch((refreshTokenError: any) => {
|
||||||
|
reject(refreshTokenError)
|
||||||
})
|
})
|
||||||
.catch((refreshTokenError: any) => {
|
|
||||||
reject(refreshTokenError)
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
return refreshingTokenPromise
|
return refreshingTokenPromise
|
||||||
|
@ -339,7 +338,7 @@ export class PeerTubeEmbed {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
playlistResponse = await playlistPromise
|
playlistResponse = await playlistPromise
|
||||||
isResponseOk = true
|
isResponseOk = playlistResponse.status === 200
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
isResponseOk = false
|
isResponseOk = false
|
||||||
|
@ -368,7 +367,7 @@ export class PeerTubeEmbed {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
videoResponse = await videoPromise
|
videoResponse = await videoPromise
|
||||||
isResponseOk = true
|
isResponseOk = videoResponse.status === 200
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue