]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/accounts.ts
Don't forward view, send updates instead
[github/Chocobozzz/PeerTube.git] / server / controllers / api / accounts.ts
index b7691ccba2f8e2544bdda03b3d4b4b222d13b20d..86ef2aed1f93cf925593a3c1ed12919c83e889ff 100644 (file)
@@ -1,7 +1,8 @@
 import * as express from 'express'
 import { getFormattedObjects } from '../../helpers/utils'
 import {
-  asyncMiddleware, commonVideosFiltersValidator,
+  asyncMiddleware,
+  commonVideosFiltersValidator,
   listVideoAccountChannelsValidator,
   optionalAuthenticate,
   paginationValidator,
@@ -86,9 +87,11 @@ async function listAccountVideos (req: express.Request, res: express.Response, n
     languageOneOf: req.query.languageOneOf,
     tagsOneOf: req.query.tagsOneOf,
     tagsAllOf: req.query.tagsAllOf,
+    filter: req.query.filter,
     nsfw: buildNSFWFilter(res, req.query.nsfw),
     withFiles: false,
-    accountId: account.id
+    accountId: account.id,
+    user: res.locals.oauth ? res.locals.oauth.token.User : undefined
   })
 
   return res.json(getFormattedObjects(resultList.data, resultList.total))