gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: Sandbox: query story after bank accoun


From: gnunet
Subject: [libeufin] branch master updated: Sandbox: query story after bank account label.
Date: Tue, 24 Aug 2021 12:15:02 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new 6faef7b  Sandbox: query story after bank account label.
6faef7b is described below

commit 6faef7b95a0fa297945852d5e5a584afdfe4b307
Author: MS <ms@taler.net>
AuthorDate: Mon Aug 23 23:14:21 2021 -1100

    Sandbox: query story after bank account label.
---
 sandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt | 3 ++-
 sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt
index 6db929d..792a174 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt
@@ -66,6 +66,7 @@ data class BankAccountRequest(
 )
 
 data class CamtParams(
-    val iban: String,
+    // name/label of the bank account to query.
+    val bankaccount: String,
     val type: Int
 )
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index a6fa319..3e952b3 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -519,10 +519,10 @@ fun serverMain(dbName: String, port: Int) {
             // only reason for a post is to hide the iban (to some degree.)
             post("/admin/payments/camt") {
                 val body = call.receiveJson<CamtParams>()
-                val bankAccount = getBankAccountFromIban(body.iban)
-                val history = historyForAccount(bankAccount)
+                val bankaccount = getAccountFromLabel(body.bankaccount)
+                val history = historyForAccount(bankaccount)
                 SandboxAssert(body.type == 53, "Only Camt.053 is implemented")
-                val camt53 = buildCamtString(body.type, body.iban, history)
+                val camt53 = buildCamtString(body.type, bankaccount.iban, 
history)
                 call.respondText(camt53, ContentType.Text.Xml, 
HttpStatusCode.OK)
                 return@post
             }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]