public async Task Delete(string orgId, string id) { var subvault = await _subvaultRepository.GetByIdAsync(new Guid(id)); if (subvault == null || !_currentContext.OrganizationAdmin(subvault.OrganizationId)) { throw new NotFoundException(); } await _subvaultRepository.DeleteAsync(subvault); }
public async Task Delete(string orgId, string id) { var subvault = await _subvaultRepository.GetByIdAdminUserIdAsync(new Guid(id), _userService.GetProperUserId(User).Value); if (subvault == null) { throw new NotFoundException(); } await _subvaultRepository.DeleteAsync(subvault); }