[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: Fix data access.
From: |
gnunet |
Subject: |
[libeufin] branch master updated: Fix data access. |
Date: |
Tue, 17 Mar 2020 17:16:36 +0100 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository libeufin.
The following commit(s) were added to refs/heads/master by this push:
new bafc345 Fix data access.
bafc345 is described below
commit bafc34599d430d11e0b18d22fac1e5654cc39ec8
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Mar 17 17:15:57 2020 +0100
Fix data access.
Need transaction{} block to access data
contained into a "entity" object.
---
.../src/main/kotlin/tech/libeufin/sandbox/Main.kt | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index a2a60a1..63a8561 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -231,22 +231,22 @@ fun main() {
routing {
post("/{id}/history") {
-
val req = call.receive<CustomerHistoryRequest>()
val customer = findCustomer(call.parameters["id"])
val ret = CustomerHistoryResponse()
val history = extractHistory(customer.id.value, req.start,
req.end)
-
- history.forEach {
- ret.history.add(
- CustomerHistoryResponseElement(
- subject = it.subject,
- amount = "${it.amount.signToString()}${it.amount}
EUR",
- counterpart = it.counterpart,
- operationDate =
DateTime(it.operationDate).toString("Y-M-d"),
- valueDate =
DateTime(it.valueDate).toString("Y-M-d")
+ transaction {
+ history.forEach {
+ ret.history.add(
+ CustomerHistoryResponseElement(
+ subject = it.subject,
+ amount =
"${it.amount.signToString()}${it.amount} EUR",
+ counterpart = it.counterpart,
+ operationDate =
DateTime(it.operationDate).toString("Y-M-d"),
+ valueDate =
DateTime(it.valueDate).toString("Y-M-d")
+ )
)
- )
+ }
}
call.respond(ret)
return@post
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: Fix data access.,
gnunet <=