gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: fix bank account to customer mapping


From: gnunet
Subject: [libeufin] branch master updated: fix bank account to customer mapping
Date: Wed, 04 Mar 2020 16:32:06 +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 57fef96  fix bank account to customer mapping
57fef96 is described below

commit 57fef96fde68159fa2035f849da78e059e5034f7
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Mar 4 16:31:42 2020 +0100

    fix bank account to customer mapping
---
 nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt     | 5 +++--
 sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 1 -
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
index 5e06182..c77e318 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
@@ -126,8 +126,9 @@ fun getBankAccountDetailsFromAcctid(id: String): 
EbicsAccountInfoElement {
 }
 fun getSubscriberDetailsFromBankAccount(bankAccountId: String): 
EbicsClientSubscriberDetails {
     return transaction {
-        val subscriber = EbicsAccountInfoEntity.findById(bankAccountId) ?: 
throw SubscriberNotFoundError(HttpStatusCode.NotFound)
-        getSubscriberDetailsFromId(subscriber.id.value)
+        val accountInfo = EbicsAccountInfoEntity.findById(bankAccountId) ?: 
throw Exception("Bank account ($bankAccountId) not managed by Nexus")
+        logger.debug("Mapping bank account: ${bankAccountId}, to customer: 
${accountInfo.subscriber.id.value}")
+        getSubscriberDetailsFromId(accountInfo.subscriber.id.value)
     }
 }
 
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index 22e3c4a..333bb2a 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -213,7 +213,6 @@ fun main() {
         install(CallLogging) {
             this.level = Level.DEBUG
             this.logger = LOGGER
-
         }
         install(ContentNegotiation) {
             gson {

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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