diff options
| author | Fuwn <[email protected]> | 2024-01-05 21:55:47 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-01-05 21:55:47 -0800 |
| commit | 0d7b441c5acd9333e8491a0f08f422ade8c4a773 (patch) | |
| tree | af20f8006944259bed9766d27d341d6cc19c0ad4 | |
| parent | fix(birthdays): gap (diff) | |
| download | due.moe-0d7b441c5acd9333e8491a0f08f422ade8c4a773.tar.xz due.moe-0d7b441c5acd9333e8491a0f08f422ade8c4a773.zip | |
fix(routes): shortcut queries
| -rw-r--r-- | src/routes/birthdays/+server.ts | 4 | ||||
| -rw-r--r-- | src/routes/wrapped/+server.ts | 6 |
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 ); |