aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/extra-utils/videos/video-channels.ts9
-rw-r--r--shared/extra-utils/videos/videos.ts1
-rw-r--r--shared/models/videos/channel/video-channel-update.model.ts4
3 files changed, 9 insertions, 5 deletions
diff --git a/shared/extra-utils/videos/video-channels.ts b/shared/extra-utils/videos/video-channels.ts
index b4755b486..3e79cf15a 100644
--- a/shared/extra-utils/videos/video-channels.ts
+++ b/shared/extra-utils/videos/video-channels.ts
@@ -74,12 +74,13 @@ function updateVideoChannel (
74 attributes: VideoChannelUpdate, 74 attributes: VideoChannelUpdate,
75 expectedStatus = 204 75 expectedStatus = 204
76) { 76) {
77 const body = {} 77 const body: any = {}
78 const path = '/api/v1/video-channels/' + channelName 78 const path = '/api/v1/video-channels/' + channelName
79 79
80 if (attributes.displayName) body['displayName'] = attributes.displayName 80 if (attributes.displayName) body.displayName = attributes.displayName
81 if (attributes.description) body['description'] = attributes.description 81 if (attributes.description) body.description = attributes.description
82 if (attributes.support) body['support'] = attributes.support 82 if (attributes.support) body.support = attributes.support
83 if (attributes.bulkVideosSupportUpdate) body.bulkVideosSupportUpdate = attributes.bulkVideosSupportUpdate
83 84
84 return request(url) 85 return request(url)
85 .put(path) 86 .put(path)
diff --git a/shared/extra-utils/videos/videos.ts b/shared/extra-utils/videos/videos.ts
index a4ca43f26..debaaf9a7 100644
--- a/shared/extra-utils/videos/videos.ts
+++ b/shared/extra-utils/videos/videos.ts
@@ -355,6 +355,7 @@ async function uploadVideo (url: string, accessToken: string, videoAttributesArg
355 .set('Accept', 'application/json') 355 .set('Accept', 'application/json')
356 .set('Authorization', 'Bearer ' + accessToken) 356 .set('Authorization', 'Bearer ' + accessToken)
357 .field('name', attributes.name) 357 .field('name', attributes.name)
358 .field('support', attributes.support)
358 .field('nsfw', JSON.stringify(attributes.nsfw)) 359 .field('nsfw', JSON.stringify(attributes.nsfw))
359 .field('commentsEnabled', JSON.stringify(attributes.commentsEnabled)) 360 .field('commentsEnabled', JSON.stringify(attributes.commentsEnabled))
360 .field('downloadEnabled', JSON.stringify(attributes.downloadEnabled)) 361 .field('downloadEnabled', JSON.stringify(attributes.downloadEnabled))
diff --git a/shared/models/videos/channel/video-channel-update.model.ts b/shared/models/videos/channel/video-channel-update.model.ts
index 3626ce8a9..8dde9188b 100644
--- a/shared/models/videos/channel/video-channel-update.model.ts
+++ b/shared/models/videos/channel/video-channel-update.model.ts
@@ -1,5 +1,7 @@
1export interface VideoChannelUpdate { 1export interface VideoChannelUpdate {
2 displayName: string 2 displayName?: string
3 description?: string 3 description?: string
4 support?: string 4 support?: string
5
6 bulkVideosSupportUpdate?: boolean
5} 7}