mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 17:17:09 +00:00
Endpoint getCurrentFxRate tweaked
This commit is contained in:
parent
50a9943744
commit
509c1bcf74
@ -257,7 +257,7 @@ trait APIMethods220 {
|
||||
_ <- tryo(assert(isValidCurrencyISOCode(fromCurrencyCode))) ?~! ErrorMessages.InvalidISOCurrencyCode
|
||||
_ <- tryo(assert(isValidCurrencyISOCode(toCurrencyCode))) ?~! ErrorMessages.InvalidISOCurrencyCode
|
||||
_ <- cc.user ?~! UserNotLoggedIn
|
||||
fxRate <- tryo(Connector.connector.vend.getCurrentFxRate(bankId, fromCurrencyCode, toCurrencyCode).openOrThrowException(attemptedToOpenAnEmptyBox)) ?~! ErrorMessages.FXCurrencyCodeCombinationsNotSupported
|
||||
fxRate <- Connector.connector.vend.getCurrentFxRate(bankId, fromCurrencyCode, toCurrencyCode) ?~! ErrorMessages.FXCurrencyCodeCombinationsNotSupported
|
||||
} yield {
|
||||
val viewJSON = JSONFactory220.createFXRateJSON(fxRate)
|
||||
successJsonResponse(Extraction.decompose(viewJSON))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user