Fix upload script

This commit is contained in:
Chocobozzz
2019-06-11 10:39:30 +02:00
parent 4c7f776136
commit fc8c024a1b
2 changed files with 5 additions and 3 deletions

View 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)
}