[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: Default dates needed.
From: |
gnunet |
Subject: |
[libeufin] branch master updated: Default dates needed. |
Date: |
Thu, 14 May 2020 20:19:54 +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 9689878 Default dates needed.
9689878 is described below
commit 96898782fa6809d9b680cbbc74086aaf036ee9c5
Author: MS <address@hidden>
AuthorDate: Thu May 14 20:19:38 2020 +0200
Default dates needed.
---
integration-tests/test-ebics-new.py | 16 ++++++++++------
nexus/src/main/kotlin/tech/libeufin/nexus/JSON.kt | 7 ++++---
nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt | 2 +-
3 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/integration-tests/test-ebics-new.py
b/integration-tests/test-ebics-new.py
index 1d1d870..764e7c3 100755
--- a/integration-tests/test-ebics-new.py
+++ b/integration-tests/test-ebics-new.py
@@ -246,18 +246,22 @@ assertResponse(
)
)
-nexus.terminate()
-sandbox.terminate()
-exit(44)
-
#3, request history to Nexus
assertResponse(
post(
-
"http://localhost:5001/ebics/subscribers/{}/collect-transactions-c53".format(USERNAME),
- json=dict()
+ "http://localhost:5001/bank-accounts/collected-transactions",
+ json=dict(
+ type="ebics",
+ name="my-ebics"
+ ),
+ headers=dict(Authorization=USER_AUTHORIZATION_HEADER)
)
)
+nexus.terminate()
+sandbox.terminate()
+exit(44)
+
#4
resp = assertResponse(
get(
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/JSON.kt
b/nexus/src/main/kotlin/tech/libeufin/nexus/JSON.kt
index 8f27ec9..b010332 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/JSON.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/JSON.kt
@@ -1,5 +1,6 @@
package tech.libeufin.nexus
+import org.joda.time.DateTime
import tech.libeufin.util.*
import java.time.LocalDate
@@ -15,8 +16,8 @@ data class EbicsStandardOrderParamsJson(val dateRange:
EbicsDateRangeJson?) {
fun toOrderParams(): EbicsOrderParams {
var dateRange: EbicsDateRange? = if (this.dateRange != null) {
EbicsDateRange(
- LocalDate.parse(this.dateRange.start),
- LocalDate.parse(this.dateRange.end)
+ LocalDate.parse(this.dateRange.start ?: "1970-01-31"),
+ LocalDate.parse(this.dateRange.end ?:
DateTime.now().toDashedDate())
)
} else {
null
@@ -158,7 +159,7 @@ data class SubmitPayment(
/** Request type of "POST /collected-transactions" */
data class CollectedTransaction(
- val transport: tech.libeufin.nexus.Transport?,
+ val transport: Transport?,
val start: String?,
val end: String?
)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
index 5d2b96f..7b7c19d 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
@@ -376,7 +376,7 @@ fun main() {
* the basis of a transport subscriber (regardless of their
* bank account details)
*/
- post("/bank-accounts/{accountid}/collected-transactions") {
+ post("/bank-accounts/collected-transactions") {
val userId =
authenticateRequest(call.request.headers["Authorization"])
val body = call.receive<CollectedTransaction>()
if (body.transport != null) {
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: Default dates needed.,
gnunet <=