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:
parent
1bfc07e4cc
commit
38267c0c8a
5 changed files with 74 additions and 8 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue