Redirecting aliased actors and tags.

This commit is contained in:
2026-07-07 01:05:18 +02:00
parent a94c24581f
commit 1f5bbb6ce5
7 changed files with 21 additions and 7 deletions

View File

@@ -47,6 +47,10 @@ 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([