From 4da4cd6509af4805a008cebe22a0d3022c1be0c6 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Wed, 22 Feb 2023 12:19:35 +0000 Subject: [PATCH] feat: update endpoint --- .gitpod.yml | 9 +++++++++ src/lib/stores/sdk.ts | 2 +- src/routes/register/invite/[slug]/+page.svelte | 4 ++-- 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 .gitpod.yml diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 000000000..3c1848749 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,9 @@ +# This configuration file was automatically generated by Gitpod. +# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml) +# and commit this file to your remote git repository to share the goodness with others. + +# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart + +tasks: + - init: npm install && npm run build + command: npm run dev diff --git a/src/lib/stores/sdk.ts b/src/lib/stores/sdk.ts index de55f3d0a..e01f0d655 100644 --- a/src/lib/stores/sdk.ts +++ b/src/lib/stores/sdk.ts @@ -49,4 +49,4 @@ const sdkForProject = { users: new Users(clientProject) }; -export { sdkForConsole, sdkForProject, setProject }; +export { sdkForConsole, sdkForProject, setProject, endpoint }; diff --git a/src/routes/register/invite/[slug]/+page.svelte b/src/routes/register/invite/[slug]/+page.svelte index c1d86c3e9..aa61660f6 100644 --- a/src/routes/register/invite/[slug]/+page.svelte +++ b/src/routes/register/invite/[slug]/+page.svelte @@ -11,7 +11,7 @@ InputText } from '$lib/elements/forms'; import { addNotification } from '$lib/stores/notifications'; - import { sdkForConsole } from '$lib/stores/sdk'; + import { sdkForConsole, endpoint } from '$lib/stores/sdk'; import { Unauthenticated } from '$lib/layout'; import FormList from '$lib/elements/forms/formList.svelte'; import { Dependencies } from '$lib/constants'; @@ -51,7 +51,7 @@ async function invite() { try { disabled = true; - const res = await fetch(`${VARS.APPWRITE_ENDPOINT}/account/invite`, { + const res = await fetch(`${endpoint}/account/invite`, { method: 'POST', headers: { 'Content-Type': 'application/json'