Redirecting aliased actors and tags.
This commit is contained in:
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user