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:
@ -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)
|
||||
|
Reference in New Issue
Block a user