From fe98765624cdd6695739bda719fcb726b71c2b2a Mon Sep 17 00:00:00 2001
From: Chocobozzz <me@florianbigard.com>
Date: Wed, 8 Jan 2020 14:15:16 +0100
Subject: Add ability to skip count query

---
 server/helpers/express-utils.ts | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

(limited to 'server/helpers')

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) {
     (CONFIG.SEARCH.REMOTE_URI.USERS === true && user !== undefined)
 }
 
+function getCountVideos (req: express.Request) {
+  return req.query.skipCount !== true
+}
+
 // ---------------------------------------------------------------------------
 
 export {
@@ -125,5 +129,6 @@ export {
   isUserAbleToSearchRemoteURI,
   badRequest,
   createReqFiles,
-  cleanUpReqFiles
+  cleanUpReqFiles,
+  getCountVideos
 }
-- 
cgit v1.2.3