mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 00:22:50 -05:00
storage adjustment and billing fixes
This commit is contained in:
@ -395,7 +395,7 @@ namespace Bit.Api.Controllers
|
||||
throw new UnauthorizedAccessException();
|
||||
}
|
||||
|
||||
await _userService.AdjustStorageAsync(user, model.StroageGbAdjustment.Value);
|
||||
await _userService.AdjustStorageAsync(user, model.StorageGbAdjustment.Value);
|
||||
}
|
||||
|
||||
[HttpPut("cancel-premium")]
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user