gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: fix DB check


From: gnunet
Subject: [libeufin] branch master updated: fix DB check
Date: Mon, 23 Nov 2020 12:26:38 +0100

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 07a6fdc  fix DB check
07a6fdc is described below

commit 07a6fdc83d10906b272d711e219fa616961c4cc8
Author: MS <ms@taler.net>
AuthorDate: Mon Nov 23 12:26:32 2020 +0100

    fix DB check
---
 nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt
index 3c2b60d..d2c9112 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/server/NexusServer.kt
@@ -644,7 +644,9 @@ fun serverMain(dbName: String, host: String) {
                 val body = call.receive<CreateBankConnectionRequestJson>()
                 transaction {
                     val user = authenticateRequest(call.request)
-                    if (NexusBankAccountEntity.findById(body.name) != null) {
+                    if (NexusBankAccountEntity.find {
+                            NexusBankConnectionsTable.id eq body.name and 
(NexusBankConnectionsTable.owner eq user.id)
+                        }.firstOrNull() != null) {
                         throw NexusError(HttpStatusCode.NotAcceptable, 
"connection '${body.name}' exists already")
                     }
                     when (body) {

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