File tree Expand file tree Collapse file tree 5 files changed +17
-4
lines changed
overview/platforms/wizard Expand file tree Collapse file tree 5 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,12 @@ import { sdk } from '$lib/stores/sdk';
2
2
import type { LayoutLoad } from './$types' ;
3
3
4
4
export const load : LayoutLoad = async ( ) => {
5
- const response = await fetch ( `${ sdk . forConsole . client . config . endpoint } /health/version` ) ;
5
+ const { endpoint, project } = sdk . forConsole . client . config ;
6
+ const response = await fetch ( `${ endpoint } /health/version` , {
7
+ headers : {
8
+ 'X-Appwrite-Project' : project
9
+ }
10
+ } ) ;
6
11
const data = await response . json ( ) ;
7
12
8
13
return {
Original file line number Diff line number Diff line change @@ -56,8 +56,12 @@ export const versions = cachedStore<
56
56
> ( 'versions' , function ( { set } ) {
57
57
return {
58
58
load : async ( ) => {
59
- const { endpoint } = sdk . forConsole . client . config ;
60
- const response = await fetch ( `${ endpoint } /../versions` ) ;
59
+ const { endpoint, project } = sdk . forConsole . client . config ;
60
+ const response = await fetch ( `${ endpoint } /../versions` , {
61
+ headers : {
62
+ 'X-Appwrite-Project' : project
63
+ }
64
+ } ) ;
61
65
set ( await response . json ( ) ) ;
62
66
}
63
67
} ;
Original file line number Diff line number Diff line change 74
74
' PATCH' ,
75
75
new URL (sdk .forConsole .client .config .endpoint + path ),
76
76
{
77
+ ' X-Appwrite-Project' : sdk .forConsole .client .config .project ,
77
78
' content-type' : ' application/json'
78
79
},
79
80
{
Original file line number Diff line number Diff line change 20
20
sdk .forConsole .client .config .endpoint + ' /projects/' + $project .$id + ' /team'
21
21
),
22
22
{
23
+ ' X-Appwrite-Project' : sdk .forConsole .client .config .project ,
23
24
' content-type' : ' application/json'
24
25
},
25
26
{
Original file line number Diff line number Diff line change 54
54
55
55
async function invite() {
56
56
try {
57
- const res = await fetch (` ${sdk .forConsole .client .config .endpoint }/account/invite ` , {
57
+ const { endpoint, project } = sdk .forConsole .client .config ;
58
+ const res = await fetch (` ${endpoint }/account/invite ` , {
58
59
method: ' POST' ,
59
60
headers: {
61
+ ' X-Appwrite-Project' : project ,
60
62
' Content-Type' : ' application/json'
61
63
},
62
64
body: JSON .stringify ({
You can’t perform that action at this time.
0 commit comments