From fe98765624cdd6695739bda719fcb726b71c2b2a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 8 Jan 2020 14:15:16 +0100 Subject: Add ability to skip count query --- shared/extra-utils/videos/videos.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'shared/extra-utils') 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 ( }) } -function getVideosListPagination (url: string, start: number, count: number, sort?: string) { +function getVideosListPagination (url: string, start: number, count: number, sort?: string, skipCount?: boolean) { const path = '/api/v1/videos' const req = request(url) @@ -257,6 +257,7 @@ function getVideosListPagination (url: string, start: number, count: number, sor .query({ count: count }) if (sort) req.query({ sort }) + if (skipCount) req.query({ skipCount }) return req.set('Accept', 'application/json') .expect(200) -- cgit v1.2.3