projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
61b3e14
)
Fix 401 detection on import videos
author
Chocobozzz
<me@florianbigard.com>
Tue, 20 Feb 2018 17:18:47 +0000
(18:18 +0100)
committer
Chocobozzz
<me@florianbigard.com>
Tue, 20 Feb 2018 17:18:47 +0000
(18:18 +0100)
server/tools/import-videos.ts
patch
|
blob
|
history
diff --git
a/server/tools/import-videos.ts
b/server/tools/import-videos.ts
index 268101b41ab282b13ee687a9243ecec97591ae6e..d29a2c6f316f8700c4f61adc494cb1bf7cbf8428 100644
(file)
--- a/
server/tools/import-videos.ts
+++ b/
server/tools/import-videos.ts
@@
-148,7
+148,7
@@
async function uploadVideoOnPeerTube (videoInfo: any, videoPath: string, languag
try {
await uploadVideo(program['url'], accessToken, videoAttributes)
} catch (err) {
- if (err.message.indexOf('401')) {
+ if (err.message.indexOf('401')
!== -1
) {
console.log('Got 401 Unauthorized, token may have expired, renewing token and retry.')
const res = await login(program['url'], client, user)