aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/start/+server.ts
blob: d31d1b3d930f67449e6b5a8cd01fd57318e7a68c (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, "/");
}