aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/standalone/videos/embed.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-12-01 10:43:13 +0100
committerChocobozzz <me@florianbigard.com>2020-12-01 15:04:38 +0100
commita7299d9d855caf11d8bb0bab1b1b5e0fb19d9476 (patch)
treec239bcfb715c2a6a88e79f5e676efa3edf9b6542 /client/src/standalone/videos/embed.ts
parentcf3e0d69a618450e09102b0db359fd6c6e6bbdb0 (diff)
downloadPeerTube-a7299d9d855caf11d8bb0bab1b1b5e0fb19d9476.tar.gz
PeerTube-a7299d9d855caf11d8bb0bab1b1b5e0fb19d9476.tar.zst
PeerTube-a7299d9d855caf11d8bb0bab1b1b5e0fb19d9476.zip
Fix 401 error in embeds
Diffstat (limited to 'client/src/standalone/videos/embed.ts')
-rw-r--r--client/src/standalone/videos/embed.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/client/src/standalone/videos/embed.ts b/client/src/standalone/videos/embed.ts
index 115d37ced..48f7e7749 100644
--- a/client/src/standalone/videos/embed.ts
+++ b/client/src/standalone/videos/embed.ts
@@ -125,10 +125,9 @@ export class PeerTubeEmbed {
125 this.setHeadersFromTokens() 125 this.setHeadersFromTokens()
126 126
127 resolve() 127 resolve()
128 }).catch((refreshTokenError: any) => {
129 reject(refreshTokenError)
128 }) 130 })
129 .catch((refreshTokenError: any) => {
130 reject(refreshTokenError)
131 })
132 }) 131 })
133 132
134 return refreshingTokenPromise 133 return refreshingTokenPromise
@@ -339,7 +338,7 @@ export class PeerTubeEmbed {
339 338
340 try { 339 try {
341 playlistResponse = await playlistPromise 340 playlistResponse = await playlistPromise
342 isResponseOk = true 341 isResponseOk = playlistResponse.status === 200
343 } catch (err) { 342 } catch (err) {
344 console.error(err) 343 console.error(err)
345 isResponseOk = false 344 isResponseOk = false
@@ -368,7 +367,7 @@ export class PeerTubeEmbed {
368 367
369 try { 368 try {
370 videoResponse = await videoPromise 369 videoResponse = await videoPromise
371 isResponseOk = true 370 isResponseOk = videoResponse.status === 200
372 } catch (err) { 371 } catch (err) {
373 console.error(err) 372 console.error(err)
374 373