aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-01-05 21:55:47 -0800
committerFuwn <[email protected]>2024-01-05 21:55:47 -0800
commit0d7b441c5acd9333e8491a0f08f422ade8c4a773 (patch)
treeaf20f8006944259bed9766d27d341d6cc19c0ad4
parentfix(birthdays): gap (diff)
downloaddue.moe-0d7b441c5acd9333e8491a0f08f422ade8c4a773.tar.xz
due.moe-0d7b441c5acd9333e8491a0f08f422ade8c4a773.zip
fix(routes): shortcut queries
-rw-r--r--src/routes/birthdays/+server.ts4
-rw-r--r--src/routes/wrapped/+server.ts6
2 files changed, 6 insertions, 4 deletions
diff --git a/src/routes/birthdays/+server.ts b/src/routes/birthdays/+server.ts
index fe94f3e5..2b9219b5 100644
--- a/src/routes/birthdays/+server.ts
+++ b/src/routes/birthdays/+server.ts
@@ -1,7 +1,7 @@
export const GET = ({ url }) =>
Response.redirect(
`https://due.moe/tools?tool=birthdays${
- url.search.length > 0 ? url.search.replace('?', '') : ''
+ url.searchParams.values.length > 0 ? `&${url.searchParams.toString()}` : ''
}`,
- 302
+ 301
);
diff --git a/src/routes/wrapped/+server.ts b/src/routes/wrapped/+server.ts
index 851a4d7e..2eee34f0 100644
--- a/src/routes/wrapped/+server.ts
+++ b/src/routes/wrapped/+server.ts
@@ -1,5 +1,7 @@
export const GET = ({ url }) =>
Response.redirect(
- `https://due.moe/tools?tool=wrapped${url.search.length > 0 ? url.search.replace('?', '') : ''}`,
- 302
+ `https://due.moe/tools?tool=wrapped${
+ url.searchParams.values.length > 0 ? `&${url.searchParams.toString()}` : ''
+ }`,
+ 301
);