diff --git a/src/api/api.ts b/src/api/api.ts index 81cfe09..778d06f 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -1,5 +1,5 @@ import {getEnv} from "~/utils/env"; -import {loginStore, type LoginStore} from "~/stores/login"; +import {loginStore} from "~/stores/login"; import {get} from "svelte/store"; export function URL() { @@ -15,6 +15,7 @@ export async function sendSessionRequest(path: string, opt: RequestInit) { let headers = new Headers(opt.headers); setLoginHeaders(headers); opt.headers = headers; + console.log(path); let z = await sendApiRequest(path, opt); // Auth error @@ -30,7 +31,7 @@ export async function sendSessionRequest(path: string, opt: RequestInit) { headers = new Headers(opt.headers); setLoginHeaders(headers); opt.headers = headers; - z = await fetch(URL() + path, opt); + z = await sendApiRequest(path, opt); } } return z; diff --git a/src/components/oauth/Authorize.svelte b/src/components/oauth/Authorize.svelte index 5baa0f4..cd9ee88 100644 --- a/src/components/oauth/Authorize.svelte +++ b/src/components/oauth/Authorize.svelte @@ -1,4 +1,5 @@