@kumori/aurora-backend-handler 1.1.30 → 1.1.32
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.
- package/api/tenant-api-service.ts +8 -0
- package/backend-handler.ts +2 -2
- package/package.json +1 -1
- package/websocket-manager.ts +1 -1
|
@@ -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,
|
package/backend-handler.ts
CHANGED
|
@@ -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"
|
|
@@ -101,6 +100,7 @@ export class BackendHandler {
|
|
|
101
100
|
}
|
|
102
101
|
eventHelper = new EventHelper(globalEventHandler);
|
|
103
102
|
eventHelper.user.subscribe.load((data: UserData) => {
|
|
103
|
+
listTenantsHTTP();
|
|
104
104
|
initializeGlobalWebSocketClient(token, "", "", data);
|
|
105
105
|
});
|
|
106
106
|
const loadedCb = (data: UserData) => {
|
package/package.json
CHANGED
package/websocket-manager.ts
CHANGED
|
@@ -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
|
});
|