aboutsummaryrefslogtreecommitdiff
path: root/src/routes/logout.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/logout.ts')
-rw-r--r--src/routes/logout.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/routes/logout.ts b/src/routes/logout.ts
index 9caebb6..25be86c 100644
--- a/src/routes/logout.ts
+++ b/src/routes/logout.ts
@@ -1,10 +1,10 @@
-import { API_URL } from '$lib/api'
+import { fetchApi } from '$lib/api'
import type { RequestHandler } from '@sveltejs/kit'
export const get: RequestHandler = async ({ locals, url }) => {
// if the sid is wrong, nothing to do
if (url.searchParams.has('sid') && url.searchParams.get('sid') === locals.sid) {
- await fetch(`${API_URL}accounts/session`, {
+ await fetchApi(`accounts/session`, fetch, {
method: 'DELETE',
headers: {
'Content-Type': 'application/json',