aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/overviews.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api/overviews.ts')
-rw-r--r--server/controllers/api/overviews.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/controllers/api/overviews.ts b/server/controllers/api/overviews.ts
index 727ed66d7..2dfac15ef 100644
--- a/server/controllers/api/overviews.ts
+++ b/server/controllers/api/overviews.ts
@@ -109,7 +109,7 @@ async function getVideos (
109 res: express.Response, 109 res: express.Response,
110 where: { videoChannelId?: number, tagsOneOf?: string[], categoryOneOf?: number[] } 110 where: { videoChannelId?: number, tagsOneOf?: string[], categoryOneOf?: number[] }
111) { 111) {
112 let query = Object.assign({ 112 const query = await Hooks.wrapObject({
113 start: 0, 113 start: 0,
114 count: 12, 114 count: 12,
115 sort: '-createdAt', 115 sort: '-createdAt',
@@ -117,10 +117,10 @@ async function getVideos (
117 nsfw: buildNSFWFilter(res), 117 nsfw: buildNSFWFilter(res),
118 user: res.locals.oauth ? res.locals.oauth.token.User : undefined, 118 user: res.locals.oauth ? res.locals.oauth.token.User : undefined,
119 withFiles: false, 119 withFiles: false,
120 countVideos: false 120 countVideos: false,
121 }, where)
122 121
123 query = await Hooks.wrapObject(query, 'filter:api.overviews.videos.list.params') 122 ...where
123 }, 'filter:api.overviews.videos.list.params')
124 124
125 const { data } = await Hooks.wrapPromiseFun( 125 const { data } = await Hooks.wrapPromiseFun(
126 VideoModel.listForApi, 126 VideoModel.listForApi,