aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/bots.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/controllers/bots.ts
parentddc07312b041c1c533b68a919681fc9bce83430d (diff)
downloadPeerTube-fe98765624cdd6695739bda719fcb726b71c2b2a.tar.gz
PeerTube-fe98765624cdd6695739bda719fcb726b71c2b2a.tar.zst
PeerTube-fe98765624cdd6695739bda719fcb726b71c2b2a.zip
Add ability to skip count query
Diffstat (limited to 'server/controllers/bots.ts')
-rw-r--r--server/controllers/bots.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/controllers/bots.ts b/server/controllers/bots.ts
index ed1040176..f3e778b04 100644
--- a/server/controllers/bots.ts
+++ b/server/controllers/bots.ts
@@ -61,17 +61,18 @@ async function getSitemapAccountUrls () {
61} 61}
62 62
63async function getSitemapLocalVideoUrls () { 63async function getSitemapLocalVideoUrls () {
64 const resultList = await VideoModel.listForApi({ 64 const { data } = await VideoModel.listForApi({
65 start: 0, 65 start: 0,
66 count: undefined, 66 count: undefined,
67 sort: 'createdAt', 67 sort: 'createdAt',
68 includeLocalVideos: true, 68 includeLocalVideos: true,
69 nsfw: buildNSFWFilter(), 69 nsfw: buildNSFWFilter(),
70 filter: 'local', 70 filter: 'local',
71 withFiles: false 71 withFiles: false,
72 countVideos: false
72 }) 73 })
73 74
74 return resultList.data.map(v => ({ 75 return data.map(v => ({
75 url: WEBSERVER.URL + '/videos/watch/' + v.uuid, 76 url: WEBSERVER.URL + '/videos/watch/' + v.uuid,
76 video: [ 77 video: [
77 { 78 {