diff options
| author | Fuwn <[email protected]> | 2026-04-18 09:28:20 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-04-18 09:28:20 +0000 |
| commit | a8a554439a9111854d47c37334a9544036809326 (patch) | |
| tree | bab393311c42f20c35bd7db9ef014ccc31dd9051 | |
| parent | fix(settings): propagate inner json/handler errors to outer catch (diff) | |
| download | due.moe-a8a554439a9111854d47c37334a9544036809326.tar.xz due.moe-a8a554439a9111854d47c37334a9544036809326.zip | |
Revert "fix(api): drop unused redirect query param from oauth refresh"
This reverts commit 13226aaeb7c4dc1ce01074ef1ba1eeb87b53d5f5.
| -rw-r--r-- | src/routes/api/oauth/refresh/+server.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/routes/api/oauth/refresh/+server.ts b/src/routes/api/oauth/refresh/+server.ts index 1a18c7d4..13e7ab09 100644 --- a/src/routes/api/oauth/refresh/+server.ts +++ b/src/routes/api/oauth/refresh/+server.ts @@ -1,5 +1,6 @@ import { env } from "$env/dynamic/private"; import { env as env2 } from "$env/dynamic/public"; +import { redirect } from "@sveltejs/kit"; export const GET = async ({ url, cookies }) => { const formData = new FormData(); @@ -24,5 +25,6 @@ export const GET = async ({ url, cookies }) => { secure: false, }); - return Response.json(newUser); + if (url.searchParams.get("redirect")) redirect(303, "/"); + else return Response.json(newUser); }; |