Example #1
0
        public async Task PurgeAsync(Guid organizationId)
        {
            var org = await _organizationRepository.GetByIdAsync(organizationId);

            if (org == null)
            {
                throw new NotFoundException();
            }
            await _cipherRepository.DeleteByOrganizationIdAsync(organizationId);

            await _eventService.LogOrganizationEventAsync(org, Enums.EventType.Organization_PurgedVault);
        }