aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/videos.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-09-07 17:58:09 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-09-07 17:58:09 +0200
commit8df87ce792be7b0ccdad4cb703e5ca3be66d214a (patch)
treef28b8705da384f99009f1a63942616aa244d6552 /server/tests/utils/videos.ts
parentfdbda9e3d6564ec908733c7019305f6a3c363a9f (diff)
downloadPeerTube-8df87ce792be7b0ccdad4cb703e5ca3be66d214a.tar.gz
PeerTube-8df87ce792be7b0ccdad4cb703e5ca3be66d214a.tar.zst
PeerTube-8df87ce792be7b0ccdad4cb703e5ca3be66d214a.zip
Convert real world tools to typescript
Diffstat (limited to 'server/tests/utils/videos.ts')
-rw-r--r--server/tests/utils/videos.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/tests/utils/videos.ts b/server/tests/utils/videos.ts
index 509a2430a..83271beca 100644
--- a/server/tests/utils/videos.ts
+++ b/server/tests/utils/videos.ts
@@ -185,10 +185,13 @@ function uploadVideo (url: string, accessToken: string, videoAttributesArg: Vide
185 .field('name', attributes.name) 185 .field('name', attributes.name)
186 .field('category', attributes.category.toString()) 186 .field('category', attributes.category.toString())
187 .field('licence', attributes.licence.toString()) 187 .field('licence', attributes.licence.toString())
188 .field('language', attributes.language.toString())
189 .field('nsfw', JSON.stringify(attributes.nsfw)) 188 .field('nsfw', JSON.stringify(attributes.nsfw))
190 .field('description', attributes.description) 189 .field('description', attributes.description)
191 190
191 if (attributes.language !== undefined) {
192 req.field('language', attributes.language.toString())
193 }
194
192 for (let i = 0; i < attributes.tags.length; i++) { 195 for (let i = 0; i < attributes.tags.length; i++) {
193 req.field('tags[' + i + ']', attributes.tags[i]) 196 req.field('tags[' + i + ']', attributes.tags[i])
194 } 197 }