Greenfield: Add store rates api (#4550)

* Add store rates api

* Improve doc

---------

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
This commit is contained in:
Andrew Camilleri
2023-01-31 06:42:25 +01:00
committed by GitHub
parent f821e35cb0
commit aad06c583e
9 changed files with 221 additions and 31 deletions

View File

@@ -1223,12 +1223,18 @@ namespace BTCPayServer.Controllers.Greenfield
return Task.FromResult(GetFromActionResult<StoreRateConfiguration>(GetController<GreenfieldStoreRateConfigurationController>().GetStoreRateConfiguration()));
}
public override async Task<List<StoreRatePreviewResult>> PreviewUpdateStoreRateConfiguration(string storeId,
public override async Task<List<StoreRateResult>> GetStoreRates (string storeId,
string[] currencyPair, CancellationToken token = default)
{
return GetFromActionResult<List<StoreRateResult>>(await GetController<GreenfieldStoreRatesController>().GetStoreRates(currencyPair));
}
public override async Task<List<StoreRateResult>> PreviewUpdateStoreRateConfiguration(string storeId,
StoreRateConfiguration request,
string[] currencyPair,
CancellationToken token = default)
{
return GetFromActionResult<List<StoreRatePreviewResult>>(
return GetFromActionResult<List<StoreRateResult>>(
await GetController<GreenfieldStoreRateConfigurationController>().PreviewUpdateStoreRateConfiguration(request,
currencyPair));
}