aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/logout/+server.ts
blob: 4880c2ac83957128ca64325727c8d1127500c736 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { base } from '$app/paths';
import { redirect } from '@sveltejs/kit';

export const GET = (event) =>
  redirect(
    307,
    `${base}/login/undo${
      event.url.searchParams.get('next')
        ? `?next=${encodeURIComponent(
            event.url.searchParams.get('next') ?? '/'
          )}`
        : ''
    }`
  );