@kumori/aurora-backend-handler 1.1.59 → 1.1.60
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/package.json +1 -1
- package/websocket-manager.ts +4 -3
package/package.json
CHANGED
package/websocket-manager.ts
CHANGED
|
@@ -569,7 +569,7 @@ const rebuildHierarchy = () => {
|
|
|
569
569
|
tenantsMap.forEach((tenant) => {
|
|
570
570
|
tenant.accounts = Array.from(accountsMap.values()).filter((account) => {
|
|
571
571
|
account.environments = Array.from(environmentsMap.values())
|
|
572
|
-
.filter((env) => env.account === account.id)
|
|
572
|
+
.filter((env) => env.account === account.id && env.tenant === account.tenant)
|
|
573
573
|
.map((env) => env.name);
|
|
574
574
|
return account.tenant === tenant.id;
|
|
575
575
|
});
|
|
@@ -815,7 +815,7 @@ const handleEvent = async (message: WSMessage) => {
|
|
|
815
815
|
if (!message.payload.deleted) {
|
|
816
816
|
const accountKey = parentParts.tenant ? `${parentParts.tenant}/${entityId}` : entityId;
|
|
817
817
|
accountsMap.set(accountKey, accountResult.account);
|
|
818
|
-
updateEnvironmentsCloudProvider(entityId, eventData.spec.api);
|
|
818
|
+
updateEnvironmentsCloudProvider(entityId, eventData.spec.api, parentParts.tenant);
|
|
819
819
|
}
|
|
820
820
|
break;
|
|
821
821
|
|
|
@@ -1897,9 +1897,10 @@ const getChannelsInfo = async (
|
|
|
1897
1897
|
const updateEnvironmentsCloudProvider = (
|
|
1898
1898
|
accountId: string,
|
|
1899
1899
|
cloudProviderName: string,
|
|
1900
|
+
tenantId?: string,
|
|
1900
1901
|
) => {
|
|
1901
1902
|
environmentsMap.forEach((environment, envId) => {
|
|
1902
|
-
if (environment.account === accountId) {
|
|
1903
|
+
if (environment.account === accountId && (!tenantId || environment.tenant === tenantId)) {
|
|
1903
1904
|
environment.cloudProvider = cloudProviderName;
|
|
1904
1905
|
environmentsMap.set(envId, environment);
|
|
1905
1906
|
}
|