diff options
author | Chocobozzz <me@florianbigard.com> | 2020-01-08 14:15:16 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-01-08 14:15:16 +0100 |
commit | fe98765624cdd6695739bda719fcb726b71c2b2a (patch) | |
tree | 18b19d427e5c25fc9e5290062f307e668f4c9e45 /shared/extra-utils/videos/videos.ts | |
parent | ddc07312b041c1c533b68a919681fc9bce83430d (diff) | |
download | PeerTube-fe98765624cdd6695739bda719fcb726b71c2b2a.tar.gz PeerTube-fe98765624cdd6695739bda719fcb726b71c2b2a.tar.zst PeerTube-fe98765624cdd6695739bda719fcb726b71c2b2a.zip |
Add ability to skip count query
Diffstat (limited to 'shared/extra-utils/videos/videos.ts')
-rw-r--r-- | shared/extra-utils/videos/videos.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shared/extra-utils/videos/videos.ts b/shared/extra-utils/videos/videos.ts index c5de15552..9dec12703 100644 --- a/shared/extra-utils/videos/videos.ts +++ b/shared/extra-utils/videos/videos.ts | |||
@@ -248,7 +248,7 @@ function getPlaylistVideos ( | |||
248 | }) | 248 | }) |
249 | } | 249 | } |
250 | 250 | ||
251 | function getVideosListPagination (url: string, start: number, count: number, sort?: string) { | 251 | function getVideosListPagination (url: string, start: number, count: number, sort?: string, skipCount?: boolean) { |
252 | const path = '/api/v1/videos' | 252 | const path = '/api/v1/videos' |
253 | 253 | ||
254 | const req = request(url) | 254 | const req = request(url) |
@@ -257,6 +257,7 @@ function getVideosListPagination (url: string, start: number, count: number, sor | |||
257 | .query({ count: count }) | 257 | .query({ count: count }) |
258 | 258 | ||
259 | if (sort) req.query({ sort }) | 259 | if (sort) req.query({ sort }) |
260 | if (skipCount) req.query({ skipCount }) | ||
260 | 261 | ||
261 | return req.set('Accept', 'application/json') | 262 | return req.set('Accept', 'application/json') |
262 | .expect(200) | 263 | .expect(200) |