From b56b0f74c3069347db192c079bcab868c90af15a Mon Sep 17 00:00:00 2001 From: Jiyoon Koo Date: Fri, 1 Mar 2024 16:24:43 -0500 Subject: [PATCH] making config and callbacks not private --- .../kotlin/tbdex/sdk/httpserver/TbdexHttpServer.kt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/httpserver/src/main/kotlin/tbdex/sdk/httpserver/TbdexHttpServer.kt b/httpserver/src/main/kotlin/tbdex/sdk/httpserver/TbdexHttpServer.kt index 911c1da9..1653cb27 100644 --- a/httpserver/src/main/kotlin/tbdex/sdk/httpserver/TbdexHttpServer.kt +++ b/httpserver/src/main/kotlin/tbdex/sdk/httpserver/TbdexHttpServer.kt @@ -66,9 +66,9 @@ class TbdexHttpServerConfig( * * @property config The configuration for the server, including port and optional APIs. */ -class TbdexHttpServer(private val config: TbdexHttpServerConfig) { - private val getCallbacks: MutableMap = mutableMapOf() - private val submitCallbacks: MutableMap = mutableMapOf() +class TbdexHttpServer(val config: TbdexHttpServerConfig) { + val getCallbacks: MutableMap = mutableMapOf() + val submitCallbacks: MutableMap = mutableMapOf() private var embedded = embeddedServer(Netty, port = config.port) { configure(this) } @@ -96,8 +96,9 @@ class TbdexHttpServer(private val config: TbdexHttpServerConfig) { app.routing { get("/") { call.respond( - HttpStatusCode.OK, "Please use the tbdex protocol to communicate with this server " + - "or a suitable library: https://github.com/TBD54566975/tbdex-protocol" + HttpStatusCode.OK, "Please use the tbdex protocol " + + "via a suitable library to communicate with this server: " + + "https://github.com/TBD54566975/tbdex-protocol" ) }