diff options
| author | Fuwn <[email protected]> | 2023-09-13 01:48:48 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-09-13 01:48:48 -0700 |
| commit | e144c82c717793567627cbe478d34fe9519f45d5 (patch) | |
| tree | 1987bf6a38081a2bab908e6bf56aa83ed35008be /src/routes/api | |
| parent | refactor(mangadex): move to api (diff) | |
| download | due.moe-e144c82c717793567627cbe478d34fe9519f45d5.tar.xz due.moe-e144c82c717793567627cbe478d34fe9519f45d5.zip | |
refactor(auth): move to api
Diffstat (limited to 'src/routes/api')
| -rw-r--r-- | src/routes/api/authentication/log-out/+server.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/routes/api/authentication/log-out/+server.ts b/src/routes/api/authentication/log-out/+server.ts new file mode 100644 index 00000000..22ef49d8 --- /dev/null +++ b/src/routes/api/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, '/'); +}; |