commit 1985072fca834a5d9ef8b4823526fe9288ade237 parent 64b39297300932d181988aa00fc533c808b78208 Author: Marcello Stanisci <ms@taler.net> Date: Fri, 8 May 2020 17:18:06 +0200 Comments. Diffstat:
| M | nexus/src/main/kotlin/tech/libeufin/nexus/Main2.kt | | | 37 | +++++++++++++++++++++++++++++++++++-- |
1 file changed, 35 insertions(+), 2 deletions(-)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Main2.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/Main2.kt @@ -135,42 +135,75 @@ fun main() { routing { - /** GENERAL / DEBUG ENDPOINTS */ - get("/") { call.respondText("Hello by nexus!\n") return@get } + /** + * Shows information about the requesting user. + */ get("/user") { return@get } + /** + * Add a new ordinary user in the system (requires "admin" privileges) + */ post("/users") { return@post } + /** + * Shows the bank accounts belonging to the requesting user. + */ get("/bank-accounts") { return@get } + /** + * Submit one particular payment at the bank. + */ post("/bank-accounts/{accountid}/prepared-payments/submit") { return@post } + /** + * Shows information about one particular prepared payment. + */ get("/bank-accounts/{accountid}/prepared-payments/{uuid}") { return@get } + /** + * Adds a new prepared payment. + */ post("/bank-accounts/{accountid}/prepared-payments") { return@post } + /** + * Downloads new transactions from the bank. + */ post("/bank-accounts/{accountid}/collected-transactions") { return@post } + /** + * Queries list of transactions ALREADY downloaded from the bank. + */ get("/bank-accounts/{accountid}/collected-transactions") { return@post } + /** + * Adds a new bank transport. + */ post("/bank-transports") { return@post } + /** + * Sends to the bank a message "MSG" according to the transport + * "transportName". Does not alterate any DB table. + */ post("/bank-transports/{transportName}/send{MSG}") { return@post } + /** + * Sends the bank a message "MSG" according to the transport + * "transportName". DOES alterate DB tables. + */ post("/bank-transports/{transportName}/sync{MSG}") { return@post }