From 3bc6b81abb058032c62d362cc38348dddd172e49 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 8 Jan 2024 15:45:46 -0800 Subject: fix(routes): shortcuts pass queries --- src/routes/birthdays/+server.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/routes/birthdays/+server.ts') diff --git a/src/routes/birthdays/+server.ts b/src/routes/birthdays/+server.ts index 7f0fd833..e20d6c8a 100644 --- a/src/routes/birthdays/+server.ts +++ b/src/routes/birthdays/+server.ts @@ -1,11 +1,12 @@ import root from '$lib/Utility/root.js'; -export const GET = ({ url }) => - Response.redirect( +export const GET = ({ url }) => { + return Response.redirect( root( `/tools/birthdays${ - url.searchParams.values.length > 0 ? `&${url.searchParams.toString()}` : '' + url.searchParams.toString().length > 0 ? `?${url.searchParams.toString()}` : '' }` ), 307 ); +}; -- cgit v1.2.3