1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-04 09:32:48 -05:00

storage adjustment and billing fixes

This commit is contained in:
Kyle Spearrin
2017-07-11 10:59:59 -04:00
parent a8ff190fb5
commit b49c16f529
6 changed files with 51 additions and 14 deletions

View File

@ -168,6 +168,19 @@ namespace Bit.Api.Controllers
await _organizationService.AdjustSeatsAsync(orgIdGuid, model.SeatAdjustment.Value);
}
[HttpPut("{id}/storage")]
[HttpPost("{id}/storage")]
public async Task PutStorage(string id, [FromBody]StorageRequestModel model)
{
var orgIdGuid = new Guid(id);
if(!_currentContext.OrganizationOwner(orgIdGuid))
{
throw new NotFoundException();
}
await _organizationService.AdjustStorageAsync(orgIdGuid, model.StorageGbAdjustment.Value);
}
[HttpPut("{id}/cancel")]
[HttpPost("{id}/cancel")]
public async Task PutCancel(string id)