mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
change payment API
This commit is contained in:
@ -115,6 +115,19 @@ namespace Bit.Api.Controllers
|
||||
return new OrganizationResponseModel(organization);
|
||||
}
|
||||
|
||||
[HttpPut("{id}/payment")]
|
||||
[HttpPost("{id}/payment")]
|
||||
public async Task PutPayment(string id, [FromBody]OrganizationPaymentRequestModel model)
|
||||
{
|
||||
var orgIdGuid = new Guid(id);
|
||||
if(!_currentContext.OrganizationOwner(orgIdGuid))
|
||||
{
|
||||
throw new NotFoundException();
|
||||
}
|
||||
|
||||
await _organizationService.ReplacePaymentMethodAsync(orgIdGuid, model.PaymentToken);
|
||||
}
|
||||
|
||||
[HttpDelete("{id}")]
|
||||
[HttpPost("{id}/delete")]
|
||||
public async Task Delete(string id)
|
||||
|
Reference in New Issue
Block a user