Upgraded dependencies, bumped to Node 24.
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { redirect, render } from 'vike/abort'; /* eslint-disable-line import/extensions */
|
||||
import { redirect, render } from 'vike/abort';
|
||||
|
||||
import { fetchActorsById } from '#/src/actors.js';
|
||||
import { fetchScenes } from '#/src/scenes.js';
|
||||
import { fetchMovies } from '#/src/movies.js';
|
||||
import { curateScenesQuery } from '#/src/web/scenes.js';
|
||||
import { curateMoviesQuery } from '#/src/web/movies.js';
|
||||
import { getCampaignIndex, getRandomCampaigns } from '#/src/campaigns.js';
|
||||
import { fetchCountries } from '#/src/countries.js';
|
||||
import { getRandomCampaigns, getCampaignIndex } from '#/src/campaigns.js';
|
||||
import { fetchMovies } from '#/src/movies.js';
|
||||
import { fetchScenes } from '#/src/scenes.js';
|
||||
import { curateMoviesQuery } from '#/src/web/movies.js';
|
||||
import { curateScenesQuery } from '#/src/web/scenes.js';
|
||||
|
||||
async function fetchReleases(pageContext) {
|
||||
if (pageContext.routeParams.domain === 'movies') {
|
||||
@@ -47,10 +47,6 @@ export async function onBeforeRender(pageContext) {
|
||||
throw render(404, `Cannot find actor '${pageContext.routeParams.actorId}'.`);
|
||||
}
|
||||
|
||||
if (actor.alias && !Object.hasOwn(pageContext.urlParsed.search, 'inspect')) {
|
||||
throw redirect(`/actor/${actor.alias.id}/${actor.alias.slug}`);
|
||||
}
|
||||
|
||||
const [actorReleases, campaigns, countries] = await Promise.all([
|
||||
fetchReleases(pageContext),
|
||||
getRandomCampaigns([
|
||||
@@ -63,6 +59,10 @@ export async function onBeforeRender(pageContext) {
|
||||
isEditing && fetchCountries(),
|
||||
]);
|
||||
|
||||
if (actor.alias && actorReleases.length === 0 && !Object.hasOwn(pageContext.urlParsed.search, 'inspect')) {
|
||||
throw redirect(`/actor/${actor.alias.id}/${actor.alias.slug}`);
|
||||
}
|
||||
|
||||
const campaignIndex = getCampaignIndex(actorReleases.limit);
|
||||
const [paginationCampaign, sceneCampaign] = campaigns;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user