aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/accounts.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-24 15:36:50 +0200
committerChocobozzz <me@florianbigard.com>2018-08-27 09:41:54 +0200
commit687d638c2bee0d223f206168173b1b95adbad983 (patch)
tree957741b0ba704562a233181510bb8fda0102c8a5 /server/controllers/api/accounts.ts
parentf5b0af50c85e2f8b6b2b054ac1f47123cacbe08d (diff)
downloadPeerTube-687d638c2bee0d223f206168173b1b95adbad983.tar.gz
PeerTube-687d638c2bee0d223f206168173b1b95adbad983.tar.zst
PeerTube-687d638c2bee0d223f206168173b1b95adbad983.zip
Fetch outbox when searching an actor
Diffstat (limited to 'server/controllers/api/accounts.ts')
-rw-r--r--server/controllers/api/accounts.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/controllers/api/accounts.ts b/server/controllers/api/accounts.ts
index 7b7e5e740..b7691ccba 100644
--- a/server/controllers/api/accounts.ts
+++ b/server/controllers/api/accounts.ts
@@ -11,7 +11,7 @@ import {
11import { accountsNameWithHostGetValidator, accountsSortValidator, videosSortValidator } from '../../middlewares/validators' 11import { accountsNameWithHostGetValidator, accountsSortValidator, videosSortValidator } from '../../middlewares/validators'
12import { AccountModel } from '../../models/account/account' 12import { AccountModel } from '../../models/account/account'
13import { VideoModel } from '../../models/video/video' 13import { VideoModel } from '../../models/video/video'
14import { buildNSFWFilter } from '../../helpers/express-utils' 14import { buildNSFWFilter, isUserAbleToSearchRemoteURI } from '../../helpers/express-utils'
15import { VideoChannelModel } from '../../models/video/video-channel' 15import { VideoChannelModel } from '../../models/video/video-channel'
16 16
17const accountsRouter = express.Router() 17const accountsRouter = express.Router()
@@ -73,8 +73,10 @@ async function listVideoAccountChannels (req: express.Request, res: express.Resp
73 73
74async function listAccountVideos (req: express.Request, res: express.Response, next: express.NextFunction) { 74async function listAccountVideos (req: express.Request, res: express.Response, next: express.NextFunction) {
75 const account: AccountModel = res.locals.account 75 const account: AccountModel = res.locals.account
76 const actorId = isUserAbleToSearchRemoteURI(res) ? null : undefined
76 77
77 const resultList = await VideoModel.listForApi({ 78 const resultList = await VideoModel.listForApi({
79 actorId,
78 start: req.query.start, 80 start: req.query.start,
79 count: req.query.count, 81 count: req.query.count,
80 sort: req.query.sort, 82 sort: req.query.sort,