aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/videos/video-imports.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/videos/video-imports.ts')
-rw-r--r--shared/extra-utils/videos/video-imports.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/shared/extra-utils/videos/video-imports.ts b/shared/extra-utils/videos/video-imports.ts
index 8e5abd2f5..d235181b0 100644
--- a/shared/extra-utils/videos/video-imports.ts
+++ b/shared/extra-utils/videos/video-imports.ts
@@ -15,7 +15,7 @@ function getBadVideoUrl () {
15 return 'https://download.cpy.re/peertube/bad_video.mp4' 15 return 'https://download.cpy.re/peertube/bad_video.mp4'
16} 16}
17 17
18function importVideo (url: string, token: string, attributes: VideoImportCreate) { 18function importVideo (url: string, token: string, attributes: VideoImportCreate & { torrentfile?: string }, statusCodeExpected = 200) {
19 const path = '/api/v1/videos/imports' 19 const path = '/api/v1/videos/imports'
20 20
21 let attaches: any = {} 21 let attaches: any = {}
@@ -27,7 +27,7 @@ function importVideo (url: string, token: string, attributes: VideoImportCreate)
27 token, 27 token,
28 attaches, 28 attaches,
29 fields: attributes, 29 fields: attributes,
30 statusCodeExpected: 200 30 statusCodeExpected
31 }) 31 })
32} 32}
33 33