aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/start/+server.ts
blob: b80fc762c8941c80dd08616802878a76e5ddbfad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import { redirect } from "@sveltejs/kit";

export async function GET({ cookies }) {
	const pathname = cookies.get("pathname");
	const username = cookies.get("username");
	if (username) {
		if (pathname) redirect(307, pathname);
		else redirect(307, `/${username}/receive`);
	}

	redirect(307, "/");
}