mirror of
https://github.com/Dan6erbond/sk-auth.git
synced 2024-11-20 19:07:20 +01:00
Properly export and import the mergePath
helper (#75)
* Correctly import `mergePath` * Export `mergePath`
This commit is contained in:
parent
19bff9a39c
commit
ca3cca1d6f
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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"), {
|
||||
|
Loading…
Reference in New Issue
Block a user