web/api: jwt session token, clean up, move related modules to own dir
This commit is contained in:
11
web/src/lib/api/api-url.ts
Normal file
11
web/src/lib/api/api-url.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user