diff options
author | Chocobozzz <me@florianbigard.com> | 2018-03-13 10:24:28 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-03-13 10:24:28 +0100 |
commit | 066e94c5382a761180c7d82fa24b31b66dbeaca4 (patch) | |
tree | 36037c2c5aaa6c86c2299ceafe6ec35dd1abbd13 /server/tests/utils/videos/videos.ts | |
parent | 66c3b7744c6c7a91b9538eb5a6e0ae07e0a5a6af (diff) | |
download | PeerTube-066e94c5382a761180c7d82fa24b31b66dbeaca4.tar.gz PeerTube-066e94c5382a761180c7d82fa24b31b66dbeaca4.tar.zst PeerTube-066e94c5382a761180c7d82fa24b31b66dbeaca4.zip |
Add "local" videos in menu
Diffstat (limited to 'server/tests/utils/videos/videos.ts')
-rw-r--r-- | server/tests/utils/videos/videos.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server/tests/utils/videos/videos.ts b/server/tests/utils/videos/videos.ts index ec40c5465..89db16fec 100644 --- a/server/tests/utils/videos/videos.ts +++ b/server/tests/utils/videos/videos.ts | |||
@@ -123,6 +123,17 @@ function getVideosList (url: string) { | |||
123 | .expect('Content-Type', /json/) | 123 | .expect('Content-Type', /json/) |
124 | } | 124 | } |
125 | 125 | ||
126 | function getLocalVideos (url: string) { | ||
127 | const path = '/api/v1/videos' | ||
128 | |||
129 | return request(url) | ||
130 | .get(path) | ||
131 | .query({ sort: 'name', filter: 'local' }) | ||
132 | .set('Accept', 'application/json') | ||
133 | .expect(200) | ||
134 | .expect('Content-Type', /json/) | ||
135 | } | ||
136 | |||
126 | function getMyVideos (url: string, accessToken: string, start: number, count: number, sort?: string) { | 137 | function getMyVideos (url: string, accessToken: string, start: number, count: number, sort?: string) { |
127 | const path = '/api/v1/users/me/videos' | 138 | const path = '/api/v1/users/me/videos' |
128 | 139 | ||
@@ -487,6 +498,7 @@ export { | |||
487 | rateVideo, | 498 | rateVideo, |
488 | viewVideo, | 499 | viewVideo, |
489 | parseTorrentVideo, | 500 | parseTorrentVideo, |
501 | getLocalVideos, | ||
490 | completeVideoCheck, | 502 | completeVideoCheck, |
491 | checkVideoFilesWereRemoved | 503 | checkVideoFilesWereRemoved |
492 | } | 504 | } |