@kumori/aurora-backend-handler 1.1.32 → 1.1.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -524,11 +524,11 @@ export const updateTenantHTTP = async (tenant: Tenant) => {
524
524
  eventHelper.notification.publish.creation(tenantUpdateErrorNotification);
525
525
  }
526
526
  };
527
- export const listTenantsHTTP = () => {
527
+ export const listTenantsHTTP = async () => {
528
528
  const url = new URL(
529
529
  `${environment.apiServer.baseUrl}/api/${environment.apiServer.apiVersion}/tenant`
530
530
  );
531
- const response = fetch(url.toString(), {
531
+ const response = await fetch(url.toString(), {
532
532
  method: "GET",
533
533
  });
534
534
  }
@@ -99,18 +99,18 @@ export class BackendHandler {
99
99
  );
100
100
  }
101
101
  eventHelper = new EventHelper(globalEventHandler);
102
- eventHelper.user.subscribe.load((data: UserData) => {
103
- listTenantsHTTP();
104
- initializeGlobalWebSocketClient(token, "", "", data);
102
+ listTenantsHTTP().then(() => {
103
+ eventHelper.user.subscribe.load((data: UserData) => {
104
+ initializeGlobalWebSocketClient(token, "", "", data);
105
+ });
106
+ const loadedCb = (data: UserData) => {
107
+ updateUserComplete(data);
108
+ };
109
+ eventHelper.user.subscribe.loaded(loadedCb);
110
+ this.changeRoute(route);
111
+ environment.apiServer.baseUrl = baseUrl;
112
+ environment.apiServer.apiVersion = apiVersion;
105
113
  });
106
- const loadedCb = (data: UserData) => {
107
- updateUserComplete(data);
108
- };
109
- eventHelper.user.subscribe.loaded(loadedCb);
110
-
111
- this.changeRoute(route);
112
- environment.apiServer.baseUrl = baseUrl;
113
- environment.apiServer.apiVersion = apiVersion;
114
114
  }
115
115
 
116
116
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kumori/aurora-backend-handler",
3
- "version": "1.1.32",
3
+ "version": "1.1.33",
4
4
  "description": "backend handler",
5
5
  "main": "backend-handler.ts",
6
6
  "scripts": {