diff options
Diffstat (limited to 'server/tests/utils/videos/video-channels.ts')
-rw-r--r-- | server/tests/utils/videos/video-channels.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/tests/utils/videos/video-channels.ts b/server/tests/utils/videos/video-channels.ts index 1eea22b31..092985777 100644 --- a/server/tests/utils/videos/video-channels.ts +++ b/server/tests/utils/videos/video-channels.ts | |||
@@ -54,12 +54,12 @@ function addVideoChannel ( | |||
54 | function updateVideoChannel ( | 54 | function updateVideoChannel ( |
55 | url: string, | 55 | url: string, |
56 | token: string, | 56 | token: string, |
57 | channelId: number | string, | 57 | channelName: string, |
58 | attributes: VideoChannelUpdate, | 58 | attributes: VideoChannelUpdate, |
59 | expectedStatus = 204 | 59 | expectedStatus = 204 |
60 | ) { | 60 | ) { |
61 | const body = {} | 61 | const body = {} |
62 | const path = '/api/v1/video-channels/' + channelId | 62 | const path = '/api/v1/video-channels/' + channelName |
63 | 63 | ||
64 | if (attributes.displayName) body['displayName'] = attributes.displayName | 64 | if (attributes.displayName) body['displayName'] = attributes.displayName |
65 | if (attributes.description) body['description'] = attributes.description | 65 | if (attributes.description) body['description'] = attributes.description |
@@ -73,8 +73,8 @@ function updateVideoChannel ( | |||
73 | .expect(expectedStatus) | 73 | .expect(expectedStatus) |
74 | } | 74 | } |
75 | 75 | ||
76 | function deleteVideoChannel (url: string, token: string, channelId: number | string, expectedStatus = 204) { | 76 | function deleteVideoChannel (url: string, token: string, channelName: string, expectedStatus = 204) { |
77 | const path = '/api/v1/video-channels/' + channelId | 77 | const path = '/api/v1/video-channels/' + channelName |
78 | 78 | ||
79 | return request(url) | 79 | return request(url) |
80 | .delete(path) | 80 | .delete(path) |
@@ -83,8 +83,8 @@ function deleteVideoChannel (url: string, token: string, channelId: number | str | |||
83 | .expect(expectedStatus) | 83 | .expect(expectedStatus) |
84 | } | 84 | } |
85 | 85 | ||
86 | function getVideoChannel (url: string, channelId: number | string) { | 86 | function getVideoChannel (url: string, channelName: string) { |
87 | const path = '/api/v1/video-channels/' + channelId | 87 | const path = '/api/v1/video-channels/' + channelName |
88 | 88 | ||
89 | return request(url) | 89 | return request(url) |
90 | .get(path) | 90 | .get(path) |