libeufin

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

commit a8ab0e493d16642fb5503e4409dca8e7804b28b7
parent 8cd553b284fccdfdd2851df991ea73f577fc8430
Author: MS <ms@taler.net>
Date:   Fri, 13 Jan 2023 16:13:35 +0100

fix status code (#7301)

Diffstat:
Mnexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/Taler.kt @@ -424,7 +424,13 @@ private suspend fun historyOutgoing(call: ApplicationCall) { } } } - call.respond(TextContent(customConverter(history), ContentType.Application.Json)) + val responseCode = if (history.outgoing_transactions.size == 0) + HttpStatusCode.NoContent else + HttpStatusCode.OK + call.respond( + status = responseCode, + TextContent(customConverter(history), ContentType.Application.Json) + ) } /**