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 /server/helpers/express-utils.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 'server/helpers/express-utils.ts')
-rw-r--r-- | server/helpers/express-utils.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/helpers/express-utils.ts b/server/helpers/express-utils.ts index 00f3f198b..9bf6d85a8 100644 --- a/server/helpers/express-utils.ts +++ b/server/helpers/express-utils.ts | |||
@@ -117,6 +117,10 @@ function isUserAbleToSearchRemoteURI (res: express.Response) { | |||
117 | (CONFIG.SEARCH.REMOTE_URI.USERS === true && user !== undefined) | 117 | (CONFIG.SEARCH.REMOTE_URI.USERS === true && user !== undefined) |
118 | } | 118 | } |
119 | 119 | ||
120 | function getCountVideos (req: express.Request) { | ||
121 | return req.query.skipCount !== true | ||
122 | } | ||
123 | |||
120 | // --------------------------------------------------------------------------- | 124 | // --------------------------------------------------------------------------- |
121 | 125 | ||
122 | export { | 126 | export { |
@@ -125,5 +129,6 @@ export { | |||
125 | isUserAbleToSearchRemoteURI, | 129 | isUserAbleToSearchRemoteURI, |
126 | badRequest, | 130 | badRequest, |
127 | createReqFiles, | 131 | createReqFiles, |
128 | cleanUpReqFiles | 132 | cleanUpReqFiles, |
133 | getCountVideos | ||
129 | } | 134 | } |