gnunet-svn
[Top][All Lists]
Advanced

[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.



reply via email to

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