refactor: endpoint constant on footer

This commit is contained in:
tglide committed 2023-02-23 17:38:41 +00:00
1 parent 8f2abfa6e5
commit d3381b9cb6
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -13,7 +13,7 @@ import {
Users
} from '@aw-labs/appwrite-console';
export const endpoint = VARS.APPWRITE_ENDPOINT ?? `${globalThis?.location?.origin}/v1`;
const endpoint = VARS.APPWRITE_ENDPOINT ?? `${globalThis?.location?.origin}/v1`;
const clientConsole = new Client();
clientConsole.setEndpoint(endpoint).setProject('console');
+2 -2
View File
@@ -1,8 +1,8 @@
import { endpoint } from '$lib/stores/sdk';
import { sdkForConsole } from '$lib/stores/sdk';
import type { LayoutLoad } from './$types';
export const load: LayoutLoad = async () => {
const response = await fetch(`${endpoint}/health/version`);
const response = await fetch(`${sdkForConsole.client.config.endpoint}/health/version`);
const data = await response.json();
return {