web/api: jwt session token, clean up, move related modules to own dir

This commit is contained in:
wukko
2024-08-16 23:36:56 +06:00
parent 16acf62886
commit 4857030933
9 changed files with 255 additions and 145 deletions

View File

@@ -0,0 +1,11 @@
import { get } from "svelte/store";
import env, { apiURL } from "$lib/env";
import settings from "$lib/state/settings";
export const currentApiURL = () => {
if (env.DEFAULT_API && get(settings).processing.allowDefaultOverride) {
return env.DEFAULT_API;
}
return apiURL;
}