Integrated showcased filter.
This commit is contained in:
parent
707ec56bc8
commit
6701caf4b1
|
@ -3,6 +3,7 @@ import { fetchScenes } from '#/src/scenes.js';
|
|||
export async function onBeforeRender(pageContext) {
|
||||
const { scenes, limit, total } = await fetchScenes({
|
||||
scope: pageContext.routeParams.scope || 'latest',
|
||||
isShowcased: true,
|
||||
}, {
|
||||
page: Number(pageContext.routeParams.page) || 1,
|
||||
limit: Number(pageContext.urlParsed.search.limit) || 30,
|
||||
|
|
|
@ -422,6 +422,10 @@ async function queryManticoreSql(filters, options, _reqUser) {
|
|||
builder.whereIn('any(actor_ids)', filters.actorIds);
|
||||
}
|
||||
|
||||
if (typeof filters.isShowcased === 'boolean') {
|
||||
builder.where('is_showcased', filters.isShowcased);
|
||||
}
|
||||
|
||||
if (!filters.scope || filters.scope === 'latest') {
|
||||
builder
|
||||
.where('effective_date', '<=', Math.round(Date.now() / 1000))
|
||||
|
|
Loading…
Reference in New Issue