From 1bd29506798a9420123330c3a5242f47b00611ec Mon Sep 17 00:00:00 2001 From: buttercat1791 Date: Tue, 29 Jul 2025 14:26:42 -0500 Subject: [PATCH] Clean up redirects on query param based routes --- src/routes/publication/+page.server.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/routes/publication/+page.server.ts b/src/routes/publication/+page.server.ts index c753d79..29fc5a6 100644 --- a/src/routes/publication/+page.server.ts +++ b/src/routes/publication/+page.server.ts @@ -1,7 +1,7 @@ import { redirect } from "@sveltejs/kit"; import type { PageServerLoad } from "./$types"; -export const load: PageServerLoad = async ({ url }) => { +export const load: PageServerLoad = ({ url }) => { const id = url.searchParams.get("id"); const dTag = url.searchParams.get("d"); @@ -20,6 +20,7 @@ export const load: PageServerLoad = async ({ url }) => { throw redirect(301, `/publication/d/${dTag}`); } - // If no query parameters, redirect to the start page or show publication feed + // If no query parameters, redirect to the start page or show publication feed\ + // AI-TODO: Redirect to a "not found" page. throw redirect(301, "/start"); }; \ No newline at end of file