From b89d0e7dada186e31be37e62a7a75efc2dbe9c99 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sat, 26 Aug 2023 22:29:03 -0700 Subject: feat: initial build --- src/routes/authentication/log-out/+server.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/routes/authentication/log-out/+server.ts (limited to 'src/routes/authentication') diff --git a/src/routes/authentication/log-out/+server.ts b/src/routes/authentication/log-out/+server.ts new file mode 100644 index 00000000..22ef49d8 --- /dev/null +++ b/src/routes/authentication/log-out/+server.ts @@ -0,0 +1,7 @@ +import { redirect } from '@sveltejs/kit'; + +export const GET = ({ cookies }) => { + cookies.delete('user', { path: '/' }); + + throw redirect(303, '/'); +}; -- cgit v1.2.3