diff options
author | Marcello Stanisci <ms@taler.net> | 2020-05-08 17:25:11 +0200 |
---|---|---|
committer | Marcello Stanisci <ms@taler.net> | 2020-05-08 17:25:11 +0200 |
commit | 6aaa8b6aeac30c428443d68f3e17d5e331d45fa0 (patch) | |
tree | 978054cccbeb14657b67a68cf181a4bf442fd54d /nexus/src/main | |
parent | 1985072fca834a5d9ef8b4823526fe9288ade237 (diff) | |
download | libeufin-6aaa8b6aeac30c428443d68f3e17d5e331d45fa0.tar.gz libeufin-6aaa8b6aeac30c428443d68f3e17d5e331d45fa0.tar.bz2 libeufin-6aaa8b6aeac30c428443d68f3e17d5e331d45fa0.zip |
new API.
Re- include Main2 into compilation.
Diffstat (limited to 'nexus/src/main')
-rw-r--r-- | nexus/src/main/kotlin/tech/libeufin/nexus/Helpers.kt | 2 | ||||
-rw-r--r-- | nexus/src/main/kotlin/tech/libeufin/nexus/Main2.kt | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Helpers.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/Helpers.kt index e7663ebb..fd4b2674 100644 --- a/nexus/src/main/kotlin/tech/libeufin/nexus/Helpers.kt +++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Helpers.kt @@ -325,7 +325,7 @@ fun extractUserAndHashedPassword(authorizationHeader: String): Pair<String, Byte * and makes sure that the user exists in the system. * * @param authorization the Authorization:-header line. - * @return subscriber id + * @return user id */ fun authenticateRequest(authorization: String?): String { val headerLine = if (authorization == null) throw NexusError( diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Main2.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/Main2.kt index c8fb73ad..8de652b6 100644 --- a/nexus/src/main/kotlin/tech/libeufin/nexus/Main2.kt +++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Main2.kt @@ -59,13 +59,15 @@ import javax.crypto.EncryptedPrivateKeyInfo import javax.sql.rowset.serial.SerialBlob -data class NexusError(val statusCode: HttpStatusCode, val reason: String) : Exception() +/** + * Conflicts with current Main.kt +data class NexusError(val statusCode: HttpStatusCode, val reason: String) : Exception() val logger: Logger = LoggerFactory.getLogger("tech.libeufin.nexus") - fun isProduction(): Boolean { return System.getenv("NEXUS_PRODUCTION") != null } + */ @ExperimentalIoApi @KtorExperimentalAPI @@ -185,7 +187,7 @@ fun main() { * Queries list of transactions ALREADY downloaded from the bank. */ get("/bank-accounts/{accountid}/collected-transactions") { - return@post + return@get } /** * Adds a new bank transport. @@ -208,7 +210,7 @@ fun main() { return@post } } - logger.info("Up and running") - server.start(wait = true) } + logger.info("Up and running") + server.start(wait = true) }
\ No newline at end of file |