diff options
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/api/accounts.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/server/controllers/api/accounts.ts b/server/controllers/api/accounts.ts index f354ccf24..f8d2bad8b 100644 --- a/server/controllers/api/accounts.ts +++ b/server/controllers/api/accounts.ts | |||
@@ -17,7 +17,8 @@ import { | |||
17 | accountsSortValidator, | 17 | accountsSortValidator, |
18 | ensureAuthUserOwnsAccountValidator, | 18 | ensureAuthUserOwnsAccountValidator, |
19 | videoChannelsSortValidator, | 19 | videoChannelsSortValidator, |
20 | videosSortValidator | 20 | videosSortValidator, |
21 | videoChannelStatsValidator | ||
21 | } from '../../middlewares/validators' | 22 | } from '../../middlewares/validators' |
22 | import { AccountModel } from '../../models/account/account' | 23 | import { AccountModel } from '../../models/account/account' |
23 | import { AccountVideoRateModel } from '../../models/account/account-video-rate' | 24 | import { AccountVideoRateModel } from '../../models/account/account-video-rate' |
@@ -56,6 +57,7 @@ accountsRouter.get('/:accountName/videos', | |||
56 | 57 | ||
57 | accountsRouter.get('/:accountName/video-channels', | 58 | accountsRouter.get('/:accountName/video-channels', |
58 | asyncMiddleware(accountNameWithHostGetValidator), | 59 | asyncMiddleware(accountNameWithHostGetValidator), |
60 | videoChannelStatsValidator, | ||
59 | paginationValidator, | 61 | paginationValidator, |
60 | videoChannelsSortValidator, | 62 | videoChannelsSortValidator, |
61 | setDefaultSort, | 63 | setDefaultSort, |
@@ -116,7 +118,8 @@ async function listAccountChannels (req: express.Request, res: express.Response) | |||
116 | accountId: res.locals.account.id, | 118 | accountId: res.locals.account.id, |
117 | start: req.query.start, | 119 | start: req.query.start, |
118 | count: req.query.count, | 120 | count: req.query.count, |
119 | sort: req.query.sort | 121 | sort: req.query.sort, |
122 | withStats: req.query.withStats | ||
120 | } | 123 | } |
121 | 124 | ||
122 | const resultList = await VideoChannelModel.listByAccount(options) | 125 | const resultList = await VideoChannelModel.listByAccount(options) |