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

uncancel and manual prograte billing if add seats

This commit is contained in:
Kyle Spearrin
2017-04-10 16:42:53 -04:00
parent 58aa0482ba
commit fa565f46c6
6 changed files with 157 additions and 23 deletions

View File

@ -156,7 +156,7 @@ namespace Bit.Api.Controllers
[HttpPut("{id}/cancel")]
[HttpPost("{id}/cancel")]
public async Task PutCancel(string id, [FromBody]OrganizationSeatRequestModel model)
public async Task PutCancel(string id)
{
var orgIdGuid = new Guid(id);
if(!_currentContext.OrganizationOwner(orgIdGuid))
@ -167,6 +167,19 @@ namespace Bit.Api.Controllers
await _organizationService.CancelSubscriptionAsync(orgIdGuid, true);
}
[HttpPut("{id}/uncancel")]
[HttpPost("{id}/uncancel")]
public async Task PutActivate(string id)
{
var orgIdGuid = new Guid(id);
if(!_currentContext.OrganizationOwner(orgIdGuid))
{
throw new NotFoundException();
}
await _organizationService.UncancelSubscriptionAsync(orgIdGuid);
}
[HttpDelete("{id}")]
[HttpPost("{id}/delete")]
public async Task Delete(string id)