@kumori/aurora-backend-handler 1.1.0 → 1.1.2

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.
@@ -1128,7 +1128,7 @@ export const rejectInvite = async (tenant: string, security: string, leave: bool
1128
1128
  "tenant:reject_proposal_user",
1129
1129
  queryParams,
1130
1130
  30000,
1131
- "DELETE",
1131
+ "REJECT",
1132
1132
  `${tenant}/reject`
1133
1133
  );
1134
1134
  if(leave){
@@ -34,6 +34,14 @@ export const handleUserEvent = ({
34
34
  const userId = eventData.id.name;
35
35
  const userTenants = Object.keys(eventData.status.tenants);
36
36
  const deletedTenantKeys: string[] = [];
37
+ Object.entries(eventData.status.tenants).forEach(([tenantId, tenantInfo]: [string, any]) => {
38
+ if (tenantInfo.status === "rejected") {
39
+ const tenant = tenantsMap.get(tenantId);
40
+ if (tenant) {
41
+ tenantsMap.set(tenantId, { ...tenant, status: "leaving" });
42
+ }
43
+ }
44
+ });
37
45
  for (const key of tenantsMap.keys()) {
38
46
  if (!userTenants.includes(key)) {
39
47
  const tenantToDelete = tenantsMap.get(key);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kumori/aurora-backend-handler",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "backend handler",
5
5
  "main": "backend-handler.ts",
6
6
  "scripts": {