gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: Tie TWG endpoints to handlers.


From: gnunet
Subject: [libeufin] branch master updated: Tie TWG endpoints to handlers.
Date: Thu, 28 May 2020 17:14:05 +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 56a1a94  Tie TWG endpoints to handlers.
56a1a94 is described below

commit 56a1a942be96dc470d313e845dfbfc81fc607f6a
Author: MS <ms@taler.net>
AuthorDate: Thu May 28 17:13:48 2020 +0200

    Tie TWG endpoints to handlers.
---
 nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt  |  5 +++++
 nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt | 11 +++++++++++
 2 files changed, 16 insertions(+)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
index aa984ba..fdc28f5 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
@@ -964,6 +964,11 @@ fun serverMain(dbName: String) {
                 call.respondText("Facade created")
                 return@post
             }
+            route("/facades/{fcid}") {
+                route("taler") {
+                    talerFacadeRoutes(this)
+                }
+            }
             /**
              * Hello endpoint.
              */
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt
index 5611510..7ab9982 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/taler.kt
@@ -12,6 +12,7 @@ import io.ktor.response.respondText
 import io.ktor.routing.Route
 import io.ktor.routing.get
 import io.ktor.routing.post
+import org.apache.http.client.methods.RequestBuilder.post
 import org.jetbrains.exposed.dao.Entity
 import org.jetbrains.exposed.dao.IdTable
 import org.jetbrains.exposed.sql.*
@@ -212,6 +213,7 @@ fun paymentFailed(entry: RawBankTransactionEntity): Boolean 
{
     return false
 }
 
+// /taler/transfer
 suspend fun talerTransfer(call: ApplicationCall): Unit {
     val exchangeUser = authenticateRequest(call.request)
     val transferRequest = call.receive<TalerTransferRequest>()
@@ -290,6 +292,7 @@ suspend fun talerTransfer(call: ApplicationCall): Unit {
     )
 }
 
+// /taler/admin/add-incoming
 suspend fun talerAddIncoming(call: ApplicationCall): Unit {
     val exchangeUser = authenticateRequest(call.request)
     val addIncomingData = call.receive<TalerAdminAddIncoming>()
@@ -405,6 +408,7 @@ fun ingestTransactions() {
     }
 }
 
+// /taler/history/incoming
 suspend fun historyIncoming(call: ApplicationCall): Unit {
     val exchangeUser = authenticateRequest(call.request)
     val delta: Int = expectInt(call.expectUrlParameter("delta"))
@@ -439,4 +443,11 @@ suspend fun historyIncoming(call: ApplicationCall): Unit {
         }
     }
     return call.respond(TextContent(customConverter(history), 
ContentType.Application.Json))
+}
+
+fun talerFacadeRoutes(route: Route) {
+    route.post("/transfer") {}
+    route.post("/admin/add-incoming") {}
+    route.get("/history/outgoing") {}
+    route.get("/history/incoming") {}
 }
\ No newline at end of file

-- 
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]