diff options
| author | Adam Soltys <[email protected]> | 2023-12-05 09:33:41 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-12-05 09:33:41 -0800 |
| commit | f0cad01e6bd62192f42601b6eb3a961171fe1309 (patch) | |
| tree | 3adc00ae33a2fb360c2f4c2b3a9dab3f084d97de /src | |
| parent | 076339303a37a3123d7fbcaa36e3d546cfba32e8 (diff) | |
| download | coinos-ui-f0cad01e6bd62192f42601b6eb3a961171fe1309.tar.gz coinos-ui-f0cad01e6bd62192f42601b6eb3a961171fe1309.zip | |
check user cookie
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/start/+server.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/routes/start/+server.js b/src/routes/start/+server.js index 49474c36..872d9bcb 100644 --- a/src/routes/start/+server.js +++ b/src/routes/start/+server.js @@ -2,11 +2,9 @@ import { auth, get } from "$lib/utils"; import { redirect } from "@sveltejs/kit"; export async function GET({ cookies }) { - let token = cookies.get("token"); - let user; - if (token) { - user = await get("/me", auth(cookies)); - throw redirect(307, `/${user.username}`); + let token = cookies.get("user"); + if (user) { + throw redirect(307, `/${user}/receive`); } throw redirect(307, "/"); |
