1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-01 16:12:49 -05:00

[Provider] Add support for events (#1447)

This commit is contained in:
Oscar Hinton
2021-07-15 16:37:27 +02:00
committed by GitHub
parent 8ac2dc50af
commit f6ebb20847
74 changed files with 4007 additions and 635 deletions

View File

@ -79,5 +79,18 @@ namespace Bit.Api.Controllers
var result = await _providerService.CreateOrganizationAsync(providerId, organizationSignup, user);
return new ProviderOrganizationResponseModel(result);
}
[HttpDelete("{id:guid}")]
[HttpPost("{id:guid}/delete")]
public async Task Delete(Guid providerId, Guid id)
{
if (!_currentContext.ManageProviderOrganizations(providerId))
{
throw new NotFoundException();
}
var userId = _userService.GetProperUserId(User);
await _providerService.RemoveOrganization(providerId, id, userId.Value);
}
}
}