]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/videos/videos.ts
WIP plugins: move plugin CLI in peertube script
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / videos / videos.ts
index debaaf9a7df7544e32f18ed31b96e02dd2bfbb86..c785632328b63407a5c6b51ae4727582970640bb 100644 (file)
@@ -355,7 +355,6 @@ async function uploadVideo (url: string, accessToken: string, videoAttributesArg
               .set('Accept', 'application/json')
               .set('Authorization', 'Bearer ' + accessToken)
               .field('name', attributes.name)
-              .field('support', attributes.support)
               .field('nsfw', JSON.stringify(attributes.nsfw))
               .field('commentsEnabled', JSON.stringify(attributes.commentsEnabled))
               .field('downloadEnabled', JSON.stringify(attributes.downloadEnabled))
@@ -363,6 +362,10 @@ async function uploadVideo (url: string, accessToken: string, videoAttributesArg
               .field('privacy', attributes.privacy.toString())
               .field('channelId', attributes.channelId)
 
+  if (attributes.support !== undefined) {
+    req.field('support', attributes.support)
+  }
+
   if (attributes.description !== undefined) {
     req.field('description', attributes.description)
   }