diff --git a/src/Api/AdminConsole/Controllers/OrganizationsController.cs b/src/Api/AdminConsole/Controllers/OrganizationsController.cs index 632230ebcdc6..aa5efd12cb48 100644 --- a/src/Api/AdminConsole/Controllers/OrganizationsController.cs +++ b/src/Api/AdminConsole/Controllers/OrganizationsController.cs @@ -794,7 +794,7 @@ public async Task PutCollectionManagement(Guid id, [F throw new NotFoundException(); } - await _organizationService.UpdateAsync(model.ToOrganization(organization)); + await _organizationService.UpdateAsync(model.ToOrganization(organization), eventType: EventType.Organization_CollectionManagement_Updated); return new OrganizationResponseModel(organization); } diff --git a/src/Core/Enums/EventType.cs b/src/Core/Enums/EventType.cs index f03ce71a5200..af3673f10e9d 100644 --- a/src/Core/Enums/EventType.cs +++ b/src/Core/Enums/EventType.cs @@ -67,6 +67,7 @@ public enum EventType : int Organization_EnabledKeyConnector = 1606, Organization_DisabledKeyConnector = 1607, Organization_SponsorshipsSynced = 1608, + Organization_CollectionManagement_Updated = 1609, Policy_Updated = 1700, diff --git a/src/Core/Services/IOrganizationService.cs b/src/Core/Services/IOrganizationService.cs index 6da6d8fd731b..a2e23e48d552 100644 --- a/src/Core/Services/IOrganizationService.cs +++ b/src/Core/Services/IOrganizationService.cs @@ -27,7 +27,7 @@ Task> SignUpAsync(OrganizationLicense lice Task DisableAsync(Guid organizationId, DateTime? expirationDate); Task UpdateExpirationDateAsync(Guid organizationId, DateTime? expirationDate); Task EnableAsync(Guid organizationId); - Task UpdateAsync(Organization organization, bool updateBilling = false); + Task UpdateAsync(Organization organization, bool updateBilling = false, EventType eventType = EventType.Organization_Updated); Task UpdateTwoFactorProviderAsync(Organization organization, TwoFactorProviderType type); Task DisableTwoFactorProviderAsync(Organization organization, TwoFactorProviderType type); Task> InviteUsersAsync(Guid organizationId, Guid? invitingUserId, diff --git a/src/Core/Services/Implementations/OrganizationService.cs b/src/Core/Services/Implementations/OrganizationService.cs index be5eabb6e7e6..60e2cd1f684b 100644 --- a/src/Core/Services/Implementations/OrganizationService.cs +++ b/src/Core/Services/Implementations/OrganizationService.cs @@ -739,7 +739,7 @@ public async Task EnableAsync(Guid organizationId) } } - public async Task UpdateAsync(Organization organization, bool updateBilling = false) + public async Task UpdateAsync(Organization organization, bool updateBilling = false, EventType eventType = EventType.Organization_Updated) { if (organization.Id == default(Guid)) { @@ -755,7 +755,7 @@ public async Task UpdateAsync(Organization organization, bool updateBilling = fa } } - await ReplaceAndUpdateCacheAsync(organization, EventType.Organization_Updated); + await ReplaceAndUpdateCacheAsync(organization, eventType); if (updateBilling && !string.IsNullOrWhiteSpace(organization.GatewayCustomerId)) {