diff options
author | Chocobozzz <me@florianbigard.com> | 2018-04-25 10:21:38 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-04-25 13:50:48 +0200 |
commit | 6b738c7a31591a83fdcd9c78b6b1f98e543c378b (patch) | |
tree | db771d0e99e9ff27570885fe2a6f58a7c1948fbc /server/tests/utils/videos/video-channels.ts | |
parent | 48dce1c90dff4e90a4bcffefaecf157336cf904b (diff) | |
download | PeerTube-6b738c7a31591a83fdcd9c78b6b1f98e543c378b.tar.gz PeerTube-6b738c7a31591a83fdcd9c78b6b1f98e543c378b.tar.zst PeerTube-6b738c7a31591a83fdcd9c78b6b1f98e543c378b.zip |
Video channel API routes refractor
Diffstat (limited to 'server/tests/utils/videos/video-channels.ts')
-rw-r--r-- | server/tests/utils/videos/video-channels.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/tests/utils/videos/video-channels.ts b/server/tests/utils/videos/video-channels.ts index cfc541431..0b4fa89b7 100644 --- a/server/tests/utils/videos/video-channels.ts +++ b/server/tests/utils/videos/video-channels.ts | |||
@@ -34,7 +34,7 @@ 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, | 37 | accountId: number | string, |
38 | videoChannelAttributesArg: VideoChannelAttributes, | 38 | videoChannelAttributesArg: VideoChannelAttributes, |
39 | expectedStatus = 200 | 39 | expectedStatus = 200 |
40 | ) { | 40 | ) { |
@@ -59,8 +59,8 @@ function addVideoChannel ( | |||
59 | function updateVideoChannel ( | 59 | function updateVideoChannel ( |
60 | url: string, | 60 | url: string, |
61 | token: string, | 61 | token: string, |
62 | accountId: number, | 62 | accountId: number | string, |
63 | channelId: number, | 63 | channelId: number | string, |
64 | attributes: VideoChannelAttributes, | 64 | attributes: VideoChannelAttributes, |
65 | expectedStatus = 204 | 65 | expectedStatus = 204 |
66 | ) { | 66 | ) { |
@@ -79,7 +79,7 @@ function updateVideoChannel ( | |||
79 | .expect(expectedStatus) | 79 | .expect(expectedStatus) |
80 | } | 80 | } |
81 | 81 | ||
82 | function deleteVideoChannel (url: string, token: string, accountId: number, channelId: number, expectedStatus = 204) { | 82 | function deleteVideoChannel (url: string, token: string, accountId: number | string, channelId: number | string, expectedStatus = 204) { |
83 | const path = '/api/v1/accounts/' + accountId + '/video-channels/' + channelId | 83 | const path = '/api/v1/accounts/' + accountId + '/video-channels/' + channelId |
84 | 84 | ||
85 | return request(url) | 85 | return request(url) |
@@ -89,7 +89,7 @@ function deleteVideoChannel (url: string, token: string, accountId: number, chan | |||
89 | .expect(expectedStatus) | 89 | .expect(expectedStatus) |
90 | } | 90 | } |
91 | 91 | ||
92 | function getVideoChannel (url: string, accountId: number, channelId: number) { | 92 | function getVideoChannel (url: string, accountId: number | string, channelId: number | string) { |
93 | const path = '/api/v1/accounts/' + accountId + '/video-channels/' + channelId | 93 | const path = '/api/v1/accounts/' + accountId + '/video-channels/' + channelId |
94 | 94 | ||
95 | return request(url) | 95 | return request(url) |