commit 06cba3669ba42feecc655b31e799e6a654b8f638
parent f3f7d67e99ac9a976b95812ac593828102181580
Author: MS <ms@taler.net>
Date: Mon, 18 May 2020 10:51:45 +0200
Remove not-so-useful API endpoint.
Diffstat:
1 file changed, 4 insertions(+), 23 deletions(-)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -191,7 +191,7 @@ fun main() {
return@post
}
/**
- * Shows a Ebics subscriber's details.
+ * Shows all the Ebics subscribers' details.
*/
get("/admin/ebics/subscribers") {
var ret = AdminGetSubscribers()
@@ -210,27 +210,9 @@ fun main() {
return@get
}
/**
- * Shows details about ONE Ebics host
- */
- get("/ebics/hosts/{id}") {
- val resp = transaction {
- val host = EbicsHostEntity.find { EbicsHostsTable.hostID eq call.parameters["id"]!! }.firstOrNull()
- if (host == null) null
- else EbicsHostResponse(
- host.hostId,
- host.ebicsVersion
- )
- }
- if (resp == null) call.respond(
- HttpStatusCode.NotFound,
- SandboxError(HttpStatusCode.NotFound,"host not found")
- )
- else call.respond(resp)
- }
- /**
* Creates a new EBICS host.
*/
- post("/admin/ebics-host") {
+ post("/admin/ebics/host") {
val req = call.receive<EbicsHostCreateRequest>()
val pairA = CryptoUtil.generateRsaKeyPair(2048)
val pairB = CryptoUtil.generateRsaKeyPair(2048)
@@ -254,9 +236,9 @@ fun main() {
return@post
}
/**
- * Show ONLY names of all the Ebics hosts
+ * Show the names of all the Ebics hosts
*/
- get("/ebics/hosts") {
+ get("/admin/ebics/hosts") {
val ebicsHosts = transaction {
EbicsHostEntity.all().map { it.hostId }
}
@@ -268,7 +250,6 @@ fun main() {
post("/ebicsweb") {
call.ebicsweb()
}
-
}
}
LOGGER.info("Up and running")