diff options
| author | Fuwn <[email protected]> | 2023-08-26 22:29:03 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-08-26 22:29:03 -0700 |
| commit | b89d0e7dada186e31be37e62a7a75efc2dbe9c99 (patch) | |
| tree | 8c9f6b5d7aa0f709c06d5eb45fbf763883b21c89 /src/routes/authentication | |
| download | due.moe-b89d0e7dada186e31be37e62a7a75efc2dbe9c99.tar.xz due.moe-b89d0e7dada186e31be37e62a7a75efc2dbe9c99.zip | |
feat: initial build
Diffstat (limited to 'src/routes/authentication')
| -rw-r--r-- | src/routes/authentication/log-out/+server.ts | 7 |
1 files changed, 7 insertions, 0 deletions
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, '/'); +}; |