gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: Tolerating missing dates range.


From: gnunet
Subject: [libeufin] branch master updated: Tolerating missing dates range.
Date: Tue, 14 Jan 2020 14:09:34 +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 5bc40ce  Tolerating missing dates range.
5bc40ce is described below

commit 5bc40ce0dab5114766d9a4ae227c786ed381889c
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Jan 14 14:09:13 2020 +0100

    Tolerating missing dates range.
---
 .../kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git 
a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
index 02d1a24..6166d08 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
@@ -126,12 +126,16 @@ private fun ApplicationCall.handleEbicsC52(header: 
EbicsRequest.Header): ByteArr
 
     val history = extractHistoryForEach(
         subscriber.bankCustomer.id.value,
-        getGregorianDate().toString(),
-        getGregorianDate().toString()
-        /* Previous style where dates were fetched from the request:
-        op as EbicsRequest.StandardOrderParams).dateRange?.start.toString(),
--       op.dateRange?.end.toString()
-         */
+        try {
+            (op as 
EbicsRequest.StandardOrderParams).dateRange?.start.toString()
+        } catch (e: Exception) {
+            getGregorianDate().toString()
+        },
+        try {
+            (op as EbicsRequest.StandardOrderParams).dateRange?.end.toString()
+        } catch (e: Exception) {
+            getGregorianDate().toString()
+        }
     ) { println(it) }
 
     val ret = constructXml(indent = true) {

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



reply via email to

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