[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] 07/07: comments, indentation, helpers
From: |
gnunet |
Subject: |
[libeufin] 07/07: comments, indentation, helpers |
Date: |
Mon, 03 Apr 2023 01:34:42 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
commit 196f7bf20acd57a530d174a4701e45933deb9b57
Author: MS <ms@taler.net>
AuthorDate: Mon Apr 3 01:33:27 2023 +0200
comments, indentation, helpers
---
.../src/main/kotlin/tech/libeufin/sandbox/XMLEbicsConverter.kt | 2 +-
util/src/main/kotlin/HTTP.kt | 8 ++++++++
util/src/main/kotlin/JSON.kt | 5 +++++
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/XMLEbicsConverter.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/XMLEbicsConverter.kt
index 3fb622c3..f76ad942 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/XMLEbicsConverter.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/XMLEbicsConverter.kt
@@ -54,7 +54,7 @@ class XMLEbicsConverter : ContentConverter {
XMLUtil.convertJaxbToString(value)
} catch (e: Exception) {
/**
- * Not always a error: the content negotiation might have
+ * Not always an error: the content negotiation might have
* only checked if this handler could convert the response.
*/
return null
diff --git a/util/src/main/kotlin/HTTP.kt b/util/src/main/kotlin/HTTP.kt
index 374bc857..d9ff4491 100644
--- a/util/src/main/kotlin/HTTP.kt
+++ b/util/src/main/kotlin/HTTP.kt
@@ -26,6 +26,14 @@ fun notFound(msg: String): UtilError {
)
}
+fun badGateway(msg: String): UtilError {
+ return UtilError(
+ HttpStatusCode.BadGateway,
+ msg,
+ LibeufinErrorCode.LIBEUFIN_EC_NONE
+ )
+}
+
/**
* Returns the token (including the 'secret-token:' prefix)
* from a Authorization header. Throws exception on malformations
diff --git a/util/src/main/kotlin/JSON.kt b/util/src/main/kotlin/JSON.kt
index 71274ccd..b2ad4a05 100644
--- a/util/src/main/kotlin/JSON.kt
+++ b/util/src/main/kotlin/JSON.kt
@@ -51,6 +51,11 @@ enum class XLibeufinBankDirection(val direction: String) {
}
}
}
+ fun exportAsCamtDirection(): String =
+ when(this) {
+ CREDIT -> "CRDT"
+ DEBIT -> "DBIT"
+ }
}
data class XLibeufinBankPaytoReq(
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libeufin] branch master updated (ee10f1d3 -> 196f7bf2), gnunet, 2023/04/02
- [libeufin] 04/07: Scheduling tasks., gnunet, 2023/04/02
- [libeufin] 01/07: CLI test harness, gnunet, 2023/04/02
- [libeufin] 03/07: fix payto parser, gnunet, 2023/04/02
- [libeufin] 05/07: x-libeufin-bank connection, gnunet, 2023/04/02
- [libeufin] 02/07: CLI., gnunet, 2023/04/02
- [libeufin] 06/07: comments, indentation, helpers, gnunet, 2023/04/02
- [libeufin] 07/07: comments, indentation, helpers,
gnunet <=