Major backend refactor (#599)

Backend refactor
This commit is contained in:
Zef Hemel
2023-12-13 17:52:56 +01:00
committed by GitHub
parent 60d7cc704a
commit 9f082c83a9
42 changed files with 959 additions and 503 deletions
+7
View File
@@ -6,6 +6,7 @@ export class HttpSpacePrimitives implements SpacePrimitives {
constructor(
readonly url: string,
readonly expectedSpacePath?: string,
private bearerToken?: string,
) {
}
@@ -20,6 +21,12 @@ export class HttpSpacePrimitives implements SpacePrimitives {
...options.headers,
"X-Sync-Mode": "true",
};
if (this.bearerToken) {
options.headers = {
...options.headers,
"Authorization": `Bearer ${this.bearerToken}`,
};
}
try {
const result = await fetch(url, options);