Fixed search breaking due missing restrictions, added restrictions to API calls.

This commit is contained in:
2026-02-04 06:37:41 +01:00
parent 6c8fce49d6
commit a1e080c20d
9 changed files with 22 additions and 15 deletions

View File

@@ -16,22 +16,24 @@ export async function onBeforeRender(pageContext) {
}), {
page: Number(pageContext.routeParams.page) || 1,
limit: Number(pageContext.urlParsed.search.limit) || 15,
}, pageContext.user),
}, pageContext.user, { restriction: pageContext.restriction }),
fetchActors(curateActorsQuery(pageContext.urlQuery), {
page: Number(pageContext.routeParams.page) || 1,
limit: Number(pageContext.urlParsed.search.limit) || 10,
order: ['results', 'desc'],
}, pageContext.user),
}, pageContext.user, { restriction: pageContext.restriction }),
fetchMovies(await curateMoviesQuery({
...pageContext.urlQuery,
scope: pageContext.routeParams.scope || 'results',
}), {
page: Number(pageContext.routeParams.page) || 1,
limit: Number(pageContext.urlParsed.search.limit) || 5,
}, pageContext.user),
}, pageContext.user, { restriction: pageContext.restriction }),
fetchEntities({
query: pageContext.urlParsed.search.q,
limit: 5,
}, {
restriction: pageContext.restriction,
}),
]);