diff --git a/src/client/helpers.ts b/src/client/helpers.ts index 320ef4e..182cb65 100644 --- a/src/client/helpers.ts +++ b/src/client/helpers.ts @@ -1,4 +1,4 @@ -function mergePath(basePaths: (string | null)[], path: string) { +export function mergePath(basePaths: (string | null)[], path: string) { if (path.startsWith("/")) { path = path.slice(1); } diff --git a/src/client/signIn.ts b/src/client/signIn.ts index 7eb347e..9da70aa 100644 --- a/src/client/signIn.ts +++ b/src/client/signIn.ts @@ -2,6 +2,7 @@ import { page } from "@sveltejs/kit/assets/runtime/app/stores"; */ import type { LoadInput } from "@sveltejs/kit"; import type { ClientRequestConfig } from "./types"; +import { mergePath } from "./helpers"; interface SignInConfig extends ClientRequestConfig { redirectUrl?: string; diff --git a/src/client/signOut.ts b/src/client/signOut.ts index 6354689..5e0c9c9 100644 --- a/src/client/signOut.ts +++ b/src/client/signOut.ts @@ -1,6 +1,7 @@ /* import { session as session$ } from "$app/stores"; */ import type { ClientRequestConfig } from "./types"; +import { mergePath } from "./helpers"; export async function signOut(config?: ClientRequestConfig) { let res = await fetch(mergePath(["/api/auth", config?.basePath ?? null], "signout"), {