diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-24 15:36:50 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-27 09:41:54 +0200 |
commit | 687d638c2bee0d223f206168173b1b95adbad983 (patch) | |
tree | 957741b0ba704562a233181510bb8fda0102c8a5 /server/controllers/api/accounts.ts | |
parent | f5b0af50c85e2f8b6b2b054ac1f47123cacbe08d (diff) | |
download | PeerTube-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.ts | 4 |
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 { | |||
11 | import { accountsNameWithHostGetValidator, accountsSortValidator, videosSortValidator } from '../../middlewares/validators' | 11 | import { accountsNameWithHostGetValidator, accountsSortValidator, videosSortValidator } from '../../middlewares/validators' |
12 | import { AccountModel } from '../../models/account/account' | 12 | import { AccountModel } from '../../models/account/account' |
13 | import { VideoModel } from '../../models/video/video' | 13 | import { VideoModel } from '../../models/video/video' |
14 | import { buildNSFWFilter } from '../../helpers/express-utils' | 14 | import { buildNSFWFilter, isUserAbleToSearchRemoteURI } from '../../helpers/express-utils' |
15 | import { VideoChannelModel } from '../../models/video/video-channel' | 15 | import { VideoChannelModel } from '../../models/video/video-channel' |
16 | 16 | ||
17 | const accountsRouter = express.Router() | 17 | const accountsRouter = express.Router() |
@@ -73,8 +73,10 @@ async function listVideoAccountChannels (req: express.Request, res: express.Resp | |||
73 | 73 | ||
74 | async function listAccountVideos (req: express.Request, res: express.Response, next: express.NextFunction) { | 74 | async 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, |