diff options
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, |