diff options
author | Chocobozzz <me@florianbigard.com> | 2019-05-31 16:30:11 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-05-31 16:44:46 +0200 |
commit | 7d14d4d2ca82cc43c93b45bb1f90af975cfbf67c (patch) | |
tree | d2d2c9806dd1bf551ad39102149f514bca4c52eb /shared/extra-utils/videos/video-channels.ts | |
parent | 9977c128387f38dddd697b2e9a405dcea52407b7 (diff) | |
download | PeerTube-7d14d4d2ca82cc43c93b45bb1f90af975cfbf67c.tar.gz PeerTube-7d14d4d2ca82cc43c93b45bb1f90af975cfbf67c.tar.zst PeerTube-7d14d4d2ca82cc43c93b45bb1f90af975cfbf67c.zip |
Server: Bulk update videos support field
Diffstat (limited to 'shared/extra-utils/videos/video-channels.ts')
-rw-r--r-- | shared/extra-utils/videos/video-channels.ts | 9 |
1 files changed, 5 insertions, 4 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) |