function updateVideoChannel (
url: string,
token: string,
- channelId: number | string,
+ channelName: string,
attributes: VideoChannelUpdate,
expectedStatus = 204
) {
const body = {}
- const path = '/api/v1/video-channels/' + channelId
+ const path = '/api/v1/video-channels/' + channelName
if (attributes.displayName) body['displayName'] = attributes.displayName
if (attributes.description) body['description'] = attributes.description
.expect(expectedStatus)
}
-function deleteVideoChannel (url: string, token: string, channelId: number | string, expectedStatus = 204) {
- const path = '/api/v1/video-channels/' + channelId
+function deleteVideoChannel (url: string, token: string, channelName: string, expectedStatus = 204) {
+ const path = '/api/v1/video-channels/' + channelName
return request(url)
.delete(path)
.expect(expectedStatus)
}
-function getVideoChannel (url: string, channelId: number | string) {
- const path = '/api/v1/video-channels/' + channelId
+function getVideoChannel (url: string, channelName: string) {
+ const path = '/api/v1/video-channels/' + channelName
return request(url)
.get(path)