mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Fix upload script
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user