Add ability to skip count query
[oweals/peertube.git] / server / controllers / api / overviews.ts
index 37ac152dbe5ee2f47f28da27fc2fa86df3e07ce3..23706767a66069f02810646f775eacf00377fb30 100644 (file)
@@ -98,10 +98,11 @@ async function getVideos (
     sort: '-createdAt',
     includeLocalVideos: true,
     nsfw: buildNSFWFilter(res),
-    withFiles: false
+    withFiles: false,
+    countVideos: false
   }, where)
 
-  const { data } = await VideoModel.listForApi(query, false)
+  const { data } = await VideoModel.listForApi(query)
 
   return data.map(d => d.toFormattedJSON())
 }