Merge pull request #1681 from appwrite/change-endpoint

Fix: endpoint as per region
This commit is contained in:
Darshan
2025-02-19 16:44:12 +05:30
committed by GitHub
@@ -12,8 +12,9 @@
import { project } from '../store';
import { canWriteProjects } from '$lib/stores/roles';
const endpoint = sdk.forConsole.client.config.endpoint;
const projectId = $page.params.project;
const { project: projectId, region } = $page.params;
const { protocol, hostname, href } = new URL(sdk.forConsole.client.config.endpoint);
const endpoint = region ? `${protocol}//${region}-${hostname}/v1` : href;
let name: string = null;