File size: 460 Bytes
11fcc5a de4b571 11fcc5a de4b571 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import env from "$lib/env";
import { get } from "svelte/store";
import settings from "$lib/state/settings";
export const currentApiURL = () => {
const processingSettings = get(settings).processing;
const customInstanceURL = processingSettings.customInstanceURL;
if (processingSettings.enableCustomInstances && customInstanceURL.length > 0) {
return new URL(customInstanceURL).origin;
}
return new URL(env.DEFAULT_API!).origin;
}
|