aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/video-playlist.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/server/controllers/api/video-playlist.ts b/server/controllers/api/video-playlist.ts
index 795e14e73..ee6c73855 100644
--- a/server/controllers/api/video-playlist.ts
+++ b/server/controllers/api/video-playlist.ts
@@ -453,13 +453,19 @@ async function getVideoPlaylistVideos (req: express.Request, res: express.Respon
453 const user = res.locals.oauth ? res.locals.oauth.token.User : undefined 453 const user = res.locals.oauth ? res.locals.oauth.token.User : undefined
454 const server = await getServerActor() 454 const server = await getServerActor()
455 455
456 const resultList = await VideoPlaylistElementModel.listForApi({ 456 const apiOptions = await Hooks.wrapObject({
457 start: req.query.start, 457 start: req.query.start,
458 count: req.query.count, 458 count: req.query.count,
459 videoPlaylistId: videoPlaylistInstance.id, 459 videoPlaylistId: videoPlaylistInstance.id,
460 serverAccount: server.Account, 460 serverAccount: server.Account,
461 user 461 user
462 }) 462 }, 'filter:api.video-playlist.videos.list.params')
463
464 const resultList = await Hooks.wrapPromiseFun(
465 VideoPlaylistElementModel.listForApi,
466 apiOptions,
467 'filter:api.video-playlist.videos.list.result'
468 )
463 469
464 const options = { 470 const options = {
465 displayNSFW: buildNSFWFilter(res, req.query.nsfw), 471 displayNSFW: buildNSFWFilter(res, req.query.nsfw),