Server: Bulk update videos support field
This commit is contained in:
parent
9977c12838
commit
7d14d4d2ca
11 changed files with 154 additions and 32 deletions
|
@ -74,12 +74,13 @@ function updateVideoChannel (
|
|||
attributes: VideoChannelUpdate,
|
||||
expectedStatus = 204
|
||||
) {
|
||||
const body = {}
|
||||
const body: any = {}
|
||||
const path = '/api/v1/video-channels/' + channelName
|
||||
|
||||
if (attributes.displayName) body['displayName'] = attributes.displayName
|
||||
if (attributes.description) body['description'] = attributes.description
|
||||
if (attributes.support) body['support'] = attributes.support
|
||||
if (attributes.displayName) body.displayName = attributes.displayName
|
||||
if (attributes.description) body.description = attributes.description
|
||||
if (attributes.support) body.support = attributes.support
|
||||
if (attributes.bulkVideosSupportUpdate) body.bulkVideosSupportUpdate = attributes.bulkVideosSupportUpdate
|
||||
|
||||
return request(url)
|
||||
.put(path)
|
||||
|
|
|
@ -355,6 +355,7 @@ 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))
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
export interface VideoChannelUpdate {
|
||||
displayName: string
|
||||
displayName?: string
|
||||
description?: string
|
||||
support?: string
|
||||
|
||||
bulkVideosSupportUpdate?: boolean
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue