diff options
Diffstat (limited to 'server/tests/utils/videos/video-channels.ts')
-rw-r--r-- | server/tests/utils/videos/video-channels.ts | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/server/tests/utils/videos/video-channels.ts b/server/tests/utils/videos/video-channels.ts index 0b4fa89b7..978e21b19 100644 --- a/server/tests/utils/videos/video-channels.ts +++ b/server/tests/utils/videos/video-channels.ts | |||
@@ -34,11 +34,10 @@ function getAccountVideoChannelsList (url: string, accountId: number | string, s | |||
34 | function addVideoChannel ( | 34 | function addVideoChannel ( |
35 | url: string, | 35 | url: string, |
36 | token: string, | 36 | token: string, |
37 | accountId: number | string, | ||
38 | videoChannelAttributesArg: VideoChannelAttributes, | 37 | videoChannelAttributesArg: VideoChannelAttributes, |
39 | expectedStatus = 200 | 38 | expectedStatus = 200 |
40 | ) { | 39 | ) { |
41 | const path = '/api/v1/accounts/' + accountId + '/video-channels/' | 40 | const path = '/api/v1/video-channels/' |
42 | 41 | ||
43 | // Default attributes | 42 | // Default attributes |
44 | let attributes = { | 43 | let attributes = { |
@@ -59,13 +58,12 @@ function addVideoChannel ( | |||
59 | function updateVideoChannel ( | 58 | function updateVideoChannel ( |
60 | url: string, | 59 | url: string, |
61 | token: string, | 60 | token: string, |
62 | accountId: number | string, | ||
63 | channelId: number | string, | 61 | channelId: number | string, |
64 | attributes: VideoChannelAttributes, | 62 | attributes: VideoChannelAttributes, |
65 | expectedStatus = 204 | 63 | expectedStatus = 204 |
66 | ) { | 64 | ) { |
67 | const body = {} | 65 | const body = {} |
68 | const path = '/api/v1/accounts/' + accountId + '/video-channels/' + channelId | 66 | const path = '/api/v1/video-channels/' + channelId |
69 | 67 | ||
70 | if (attributes.name) body['name'] = attributes.name | 68 | if (attributes.name) body['name'] = attributes.name |
71 | if (attributes.description) body['description'] = attributes.description | 69 | if (attributes.description) body['description'] = attributes.description |
@@ -79,8 +77,8 @@ function updateVideoChannel ( | |||
79 | .expect(expectedStatus) | 77 | .expect(expectedStatus) |
80 | } | 78 | } |
81 | 79 | ||
82 | function deleteVideoChannel (url: string, token: string, accountId: number | string, channelId: number | string, expectedStatus = 204) { | 80 | function deleteVideoChannel (url: string, token: string, channelId: number | string, expectedStatus = 204) { |
83 | const path = '/api/v1/accounts/' + accountId + '/video-channels/' + channelId | 81 | const path = '/api/v1/video-channels/' + channelId |
84 | 82 | ||
85 | return request(url) | 83 | return request(url) |
86 | .delete(path) | 84 | .delete(path) |
@@ -89,8 +87,8 @@ function deleteVideoChannel (url: string, token: string, accountId: number | str | |||
89 | .expect(expectedStatus) | 87 | .expect(expectedStatus) |
90 | } | 88 | } |
91 | 89 | ||
92 | function getVideoChannel (url: string, accountId: number | string, channelId: number | string) { | 90 | function getVideoChannel (url: string, channelId: number | string) { |
93 | const path = '/api/v1/accounts/' + accountId + '/video-channels/' + channelId | 91 | const path = '/api/v1/video-channels/' + channelId |
94 | 92 | ||
95 | return request(url) | 93 | return request(url) |
96 | .get(path) | 94 | .get(path) |