1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 01:22:50 -05:00

PaymentResponseModel for storage and seat adjustments

This commit is contained in:
Kyle Spearrin
2019-08-12 10:03:50 -04:00
parent 74bbeae776
commit 157cafa551
3 changed files with 12 additions and 4 deletions

View File

@ -233,7 +233,7 @@ namespace Bit.Api.Controllers
[HttpPost("{id}/seat")]
[SelfHosted(NotSelfHostedOnly = true)]
public async Task PostSeat(string id, [FromBody]OrganizationSeatRequestModel model)
public async Task<PaymentResponseModel> PostSeat(string id, [FromBody]OrganizationSeatRequestModel model)
{
var orgIdGuid = new Guid(id);
if(!_currentContext.OrganizationOwner(orgIdGuid))
@ -241,7 +241,12 @@ namespace Bit.Api.Controllers
throw new NotFoundException();
}
await _organizationService.AdjustSeatsAsync(orgIdGuid, model.SeatAdjustment.Value);
var result = await _organizationService.AdjustSeatsAsync(orgIdGuid, model.SeatAdjustment.Value);
return new PaymentResponseModel
{
Success = true,
PaymentIntentClientSecret = result
};
}
[HttpPost("{id}/storage")]