]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/feeds.ts
Update video channel routes
[github/Chocobozzz/PeerTube.git] / server / controllers / feeds.ts
index 6a6af3e0910f9d50d4ebb17a29e97fb475098445..7dcaf7004f311e29bac7d43d701ff5d6e11161ed 100644 (file)
@@ -33,15 +33,15 @@ async function generateFeed (req: express.Request, res: express.Response, next:
   const account: AccountModel = res.locals.account
   const hideNSFW = CONFIG.INSTANCE.DEFAULT_NSFW_POLICY === 'do_not_list'
 
-  const resultList = await VideoModel.listForApi(
+  const resultList = await VideoModel.listForApi({
     start,
-    FEEDS.COUNT,
-    req.query.sort as VideoSortField,
+    count: FEEDS.COUNT,
+    sort: req.query.sort,
     hideNSFW,
-    req.query.filter,
-    true,
-    account ? account.id : null
-  )
+    filter: req.query.filter,
+    withFiles: true,
+    accountId: account ? account.id : null
+  })
 
   // Adding video items to the feed, one at a time
   resultList.data.forEach(video => {