aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/express-utils.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-01-08 14:15:16 +0100
committerChocobozzz <me@florianbigard.com>2020-01-08 14:15:16 +0100
commitfe98765624cdd6695739bda719fcb726b71c2b2a (patch)
tree18b19d427e5c25fc9e5290062f307e668f4c9e45 /server/helpers/express-utils.ts
parentddc07312b041c1c533b68a919681fc9bce83430d (diff)
downloadPeerTube-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.ts7
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
120function getCountVideos (req: express.Request) {
121 return req.query.skipCount !== true
122}
123
120// --------------------------------------------------------------------------- 124// ---------------------------------------------------------------------------
121 125
122export { 126export {
@@ -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}