diff options
author | Chocobozzz <me@florianbigard.com> | 2020-12-08 10:30:33 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-12-08 10:33:23 +0100 |
commit | 38267c0c8aa80f974a2c0b4c2bd33c8d8008ac94 (patch) | |
tree | dd99242abdd5a02de272be0f06ecfe03edadc575 /server/controllers/api/accounts.ts | |
parent | 1bfc07e4cca1464c87c317060eb86742344467a6 (diff) | |
download | PeerTube-38267c0c8aa80f974a2c0b4c2bd33c8d8008ac94.tar.gz PeerTube-38267c0c8aa80f974a2c0b4c2bd33c8d8008ac94.tar.zst PeerTube-38267c0c8aa80f974a2c0b4c2bd33c8d8008ac94.zip |
Use dedicated hooks for account/channel videos
Diffstat (limited to 'server/controllers/api/accounts.ts')
-rw-r--r-- | server/controllers/api/accounts.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/accounts.ts b/server/controllers/api/accounts.ts index 9eb29d330..e807b4f44 100644 --- a/server/controllers/api/accounts.ts +++ b/server/controllers/api/accounts.ts | |||
@@ -176,12 +176,12 @@ async function listAccountVideos (req: express.Request, res: express.Response) { | |||
176 | accountId: account.id, | 176 | accountId: account.id, |
177 | user: res.locals.oauth ? res.locals.oauth.token.User : undefined, | 177 | user: res.locals.oauth ? res.locals.oauth.token.User : undefined, |
178 | countVideos | 178 | countVideos |
179 | }, 'filter:api.videos.list.params') | 179 | }, 'filter:api.accounts.videos.list.params') |
180 | 180 | ||
181 | const resultList = await Hooks.wrapPromiseFun( | 181 | const resultList = await Hooks.wrapPromiseFun( |
182 | VideoModel.listForApi, | 182 | VideoModel.listForApi, |
183 | apiOptions, | 183 | apiOptions, |
184 | 'filter:api.videos.list.result' | 184 | 'filter:api.accounts.videos.list.result' |
185 | ) | 185 | ) |
186 | 186 | ||
187 | return res.json(getFormattedObjects(resultList.data, resultList.total)) | 187 | return res.json(getFormattedObjects(resultList.data, resultList.total)) |