Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/routes/console/+layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import { sdk } from '$lib/stores/sdk';
import type { LayoutLoad } from './$types';

export const load: LayoutLoad = async () => {
const response = await fetch(`${sdk.forConsole.client.config.endpoint}/health/version`);
const { endpoint, project } = sdk.forConsole.client.config;
const response = await fetch(`${endpoint}/health/version`, {
headers: {
'X-Appwrite-Project': project
}
});
const data = await response.json();

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,12 @@ export const versions = cachedStore<
>('versions', function ({ set }) {
return {
load: async () => {
const { endpoint } = sdk.forConsole.client.config;
const response = await fetch(`${endpoint}/../versions`);
const { endpoint, project } = sdk.forConsole.client.config;
const response = await fetch(`${endpoint}/../versions`, {
headers: {
'X-Appwrite-Project': project
}
});
set(await response.json());
}
};
Expand Down
1 change: 1 addition & 0 deletions src/routes/console/project-[project]/settings/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
'PATCH',
new URL(sdk.forConsole.client.config.endpoint + path),
{
'X-Appwrite-Project': sdk.forConsole.client.config.project,
'content-type': 'application/json'
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
sdk.forConsole.client.config.endpoint + '/projects/' + $project.$id + '/team'
),
{
'X-Appwrite-Project': sdk.forConsole.client.config.project,
'content-type': 'application/json'
},
{
Expand Down
4 changes: 3 additions & 1 deletion src/routes/register/invite/[slug]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@

async function invite() {
try {
const res = await fetch(`${sdk.forConsole.client.config.endpoint}/account/invite`, {
const { endpoint, project } = sdk.forConsole.client.config;
const res = await fetch(`${endpoint}/account/invite`, {
method: 'POST',
headers: {
'X-Appwrite-Project': project,
'Content-Type': 'application/json'
},
body: JSON.stringify({
Expand Down