gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: move DB operation inside "transaction


From: gnunet
Subject: [libeufin] branch master updated: move DB operation inside "transaction {}"
Date: Sat, 23 Oct 2021 11:28:46 +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 61c3ad39 move DB operation inside "transaction {}"
61c3ad39 is described below

commit 61c3ad39cd293055c1d9ca711933e05e71cc14b6
Author: ms <ms@taler.net>
AuthorDate: Sat Oct 23 11:28:22 2021 +0200

    move DB operation inside "transaction {}"
---
 sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index 2ee4f20c..c53dd6dc 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -520,15 +520,15 @@ val sandboxApp: Application.() -> Unit = {
         post("/admin/payments/camt") {
             call.request.basicAuth()
             val body = call.receiveJson<CamtParams>()
-            val bankaccount = getBankAccountFromLabel(
-                body.bankaccount,
-                getDefaultDemobank()
-            )
             if (body.type != 53) throw SandboxError(
                 HttpStatusCode.NotFound,
                 "Only Camt.053 documents can be generated."
             )
             val camtMessage = transaction {
+                val bankaccount = getBankAccountFromLabel(
+                    body.bankaccount,
+                    getDefaultDemobank()
+                )
                 BankAccountStatementEntity.find {
                     BankAccountStatementsTable.bankAccount eq bankaccount.id
                 }.lastOrNull()?.xmlMessage ?: throw SandboxError(

-- 
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]