diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-23 17:58:39 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-27 09:41:54 +0200 |
commit | f37dc0dd14d9ce0b59c454c2c1b935fcbe9727e9 (patch) | |
tree | 2050443febcdb2a3eec68b7bbf9687e26dcb24dc /server/controllers/api/video-channel.ts | |
parent | 240085d0056fd97ac3c7fa8fa4ce9bc32afc4d6e (diff) | |
download | PeerTube-f37dc0dd14d9ce0b59c454c2c1b935fcbe9727e9.tar.gz PeerTube-f37dc0dd14d9ce0b59c454c2c1b935fcbe9727e9.tar.zst PeerTube-f37dc0dd14d9ce0b59c454c2c1b935fcbe9727e9.zip |
Add ability to search video channels
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 | } |