1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Use dedicated hooks for account/channel videos

This commit is contained in:
Chocobozzz 2020-12-08 10:30:33 +01:00 committed by Chocobozzz
parent 1bfc07e4cc
commit 38267c0c8a
5 changed files with 74 additions and 8 deletions

View file

@ -176,12 +176,12 @@ async function listAccountVideos (req: express.Request, res: express.Response) {
accountId: account.id,
user: res.locals.oauth ? res.locals.oauth.token.User : undefined,
countVideos
}, 'filter:api.videos.list.params')
}, 'filter:api.accounts.videos.list.params')
const resultList = await Hooks.wrapPromiseFun(
VideoModel.listForApi,
apiOptions,
'filter:api.videos.list.result'
'filter:api.accounts.videos.list.result'
)
return res.json(getFormattedObjects(resultList.data, resultList.total))