diff options
Diffstat (limited to 'server/controllers/api/video-channel.ts')
-rw-r--r-- | server/controllers/api/video-channel.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/server/controllers/api/video-channel.ts b/server/controllers/api/video-channel.ts index 3f51f03f4..bd08d7a08 100644 --- a/server/controllers/api/video-channel.ts +++ b/server/controllers/api/video-channel.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { getFormattedObjects } from '../../helpers/utils' | 2 | import { getFormattedObjects, getServerActor } from '../../helpers/utils' |
3 | import { | 3 | import { |
4 | asyncMiddleware, | 4 | asyncMiddleware, |
5 | asyncRetryTransactionMiddleware, | 5 | asyncRetryTransactionMiddleware, |
@@ -95,7 +95,8 @@ export { | |||
95 | // --------------------------------------------------------------------------- | 95 | // --------------------------------------------------------------------------- |
96 | 96 | ||
97 | async function listVideoChannels (req: express.Request, res: express.Response, next: express.NextFunction) { | 97 | async function listVideoChannels (req: express.Request, res: express.Response, next: express.NextFunction) { |
98 | const resultList = await VideoChannelModel.listForApi(req.query.start, req.query.count, req.query.sort) | 98 | const serverActor = await getServerActor() |
99 | const resultList = await VideoChannelModel.listForApi(serverActor.id, req.query.start, req.query.count, req.query.sort) | ||
99 | 100 | ||
100 | return res.json(getFormattedObjects(resultList.data, resultList.total)) | 101 | return res.json(getFormattedObjects(resultList.data, resultList.total)) |
101 | } | 102 | } |