aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/video-channel.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-23 17:58:39 +0200
committerChocobozzz <me@florianbigard.com>2018-08-27 09:41:54 +0200
commitf37dc0dd14d9ce0b59c454c2c1b935fcbe9727e9 (patch)
tree2050443febcdb2a3eec68b7bbf9687e26dcb24dc /server/controllers/api/video-channel.ts
parent240085d0056fd97ac3c7fa8fa4ce9bc32afc4d6e (diff)
downloadPeerTube-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.ts5
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 @@
1import * as express from 'express' 1import * as express from 'express'
2import { getFormattedObjects } from '../../helpers/utils' 2import { getFormattedObjects, getServerActor } from '../../helpers/utils'
3import { 3import {
4 asyncMiddleware, 4 asyncMiddleware,
5 asyncRetryTransactionMiddleware, 5 asyncRetryTransactionMiddleware,
@@ -95,7 +95,8 @@ export {
95// --------------------------------------------------------------------------- 95// ---------------------------------------------------------------------------
96 96
97async function listVideoChannels (req: express.Request, res: express.Response, next: express.NextFunction) { 97async 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}