aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/videos/index.ts')
-rw-r--r--server/controllers/api/videos/index.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index a3b1dde29..11e468df2 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -436,8 +436,9 @@ async function getVideo (req: express.Request, res: express.Response) {
436 // We need more attributes 436 // We need more attributes
437 const userId: number = res.locals.oauth ? res.locals.oauth.token.User.id : null 437 const userId: number = res.locals.oauth ? res.locals.oauth.token.User.id : null
438 438
439 const video = await Hooks.wrapPromise( 439 const video = await Hooks.wrapPromiseFun(
440 VideoModel.loadForGetAPI(res.locals.video.id, undefined, userId), 440 VideoModel.loadForGetAPI,
441 { id: res.locals.video.id, userId },
441 'filter:api.video.get.result' 442 'filter:api.video.get.result'
442 ) 443 )
443 444
@@ -502,8 +503,9 @@ async function listVideos (req: express.Request, res: express.Response) {
502 user: res.locals.oauth ? res.locals.oauth.token.User : undefined 503 user: res.locals.oauth ? res.locals.oauth.token.User : undefined
503 }, 'filter:api.videos.list.params') 504 }, 'filter:api.videos.list.params')
504 505
505 const resultList = await Hooks.wrapPromise( 506 const resultList = await Hooks.wrapPromiseFun(
506 VideoModel.listForApi(apiOptions), 507 VideoModel.listForApi,
508 apiOptions,
507 'filter:api.videos.list.result' 509 'filter:api.videos.list.result'
508 ) 510 )
509 511