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

verify bank api

This commit is contained in:
Kyle Spearrin
2017-08-14 09:23:54 -04:00
parent 45141cf5d2
commit e470301327
4 changed files with 70 additions and 0 deletions

View File

@ -181,6 +181,18 @@ namespace Bit.Api.Controllers
await _organizationService.AdjustStorageAsync(orgIdGuid, model.StorageGbAdjustment.Value);
}
[HttpPost("{id}/verify-bank")]
public async Task PostVerifyBank(string id, [FromBody]OrganizationVerifyBankRequestModel model)
{
var orgIdGuid = new Guid(id);
if(!_currentContext.OrganizationOwner(orgIdGuid))
{
throw new NotFoundException();
}
await _organizationService.VerifyBankAsync(orgIdGuid, model.Amount1.Value, model.Amount2.Value);
}
[HttpPut("{id}/cancel")]
[HttpPost("{id}/cancel")]