libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit 6422e48cb4c73aa6c6f39d56979f5ee2814ab076
parent 5539fcd15818bad1a4ac4fb5c6ad149ed9347b24
Author: Antoine A <>
Date:   Fri, 24 Nov 2023 21:01:31 +0000

Fix monitor params

Diffstat:
Mbank/src/main/kotlin/tech/libeufin/bank/Params.kt | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bank/src/main/kotlin/tech/libeufin/bank/Params.kt b/bank/src/main/kotlin/tech/libeufin/bank/Params.kt @@ -62,9 +62,9 @@ data class MonitorParams( when { timeframe == Timeframe.hour && (0 > which || which > 23) -> throw badRequest("For hour timestamp param 'which' must be between 00 to 23") - timeframe == Timeframe.day && (1 > which || which > 23) -> + timeframe == Timeframe.day && (1 > which || which > lastDayOfMonth) -> throw badRequest("For day timestamp param 'which' must be between 1 to $lastDayOfMonth") - timeframe == Timeframe.month && (1 > which || which > lastDayOfMonth) -> + timeframe == Timeframe.month && (1 > which || which > 12) -> throw badRequest("For month timestamp param 'which' must be between 1 to 12") timeframe == Timeframe.year && (1 > which|| which > 9999) -> throw badRequest("For year timestamp param 'which' must be between 0001 to 9999")