@kumori/aurora-backend-handler 1.1.30 → 1.1.31

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,6 +524,14 @@ export const updateTenantHTTP = async (tenant: Tenant) => {
524
524
  eventHelper.notification.publish.creation(tenantUpdateErrorNotification);
525
525
  }
526
526
  };
527
+ export const listTenantsHTTP = () => {
528
+ const url = new URL(
529
+ `${environment.apiServer.baseUrl}/api/${environment.apiServer.apiVersion}/tenant`
530
+ );
531
+ const response = fetch(url.toString(), {
532
+ method: "GET",
533
+ });
534
+ }
527
535
 
528
536
  export const createRegistry = async (
529
537
  tenant: Tenant,
@@ -37,6 +37,7 @@ import {
37
37
  deleteTenant,
38
38
  deleteToken,
39
39
  inviteUser,
40
+ listTenantsHTTP,
40
41
  rejectInvite,
41
42
  removeUser,
42
43
  updateRegistry,
@@ -88,9 +89,7 @@ export class BackendHandler {
88
89
  globalEventHandler: any,
89
90
  baseUrl: string,
90
91
  apiVersion: string,
91
- token: string,
92
92
  ) {
93
- token = token;
94
93
  if (
95
94
  !globalEventHandler ||
96
95
  typeof globalEventHandler.subscribe !== "function"
@@ -99,6 +98,7 @@ export class BackendHandler {
99
98
  "globalEventHandler inválido. Asegúrate de pasar una instancia correcta de EventHandler.",
100
99
  );
101
100
  }
101
+ listTenantsHTTP();
102
102
  eventHelper = new EventHelper(globalEventHandler);
103
103
  eventHelper.user.subscribe.load((data: UserData) => {
104
104
  initializeGlobalWebSocketClient(token, "", "", data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kumori/aurora-backend-handler",
3
- "version": "1.1.30",
3
+ "version": "1.1.31",
4
4
  "description": "backend handler",
5
5
  "main": "backend-handler.ts",
6
6
  "scripts": {
@@ -264,7 +264,7 @@ export const initializeGlobalWebSocketClient = async (
264
264
  if (typeof window === "undefined") {
265
265
  wsConnection = new WebSocketClass(wsUrl, {
266
266
  headers: {
267
- authorization: `Bearer ${token}`,
267
+ // authorization: `Bearer ${token}`,
268
268
  },
269
269
  credentials: "include",
270
270
  });