aboutsummaryrefslogtreecommitdiff
path: root/server/core
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-01-17 13:57:58 +0100
committerLinnea Gräf <nea@nea.moe>2025-01-17 13:57:58 +0100
commit8a9f076d826cb93dcce292180de6fc2be66a7872 (patch)
treef6f92e71ee918d3ea9a55b5392eec52f70d7b747 /server/core
parente08c8778640967cc086a922f178b18e08b313a29 (diff)
downloadLocalTransactionLedger-8a9f076d826cb93dcce292180de6fc2be66a7872.tar.gz
LocalTransactionLedger-8a9f076d826cb93dcce292180de6fc2be66a7872.tar.bz2
LocalTransactionLedger-8a9f076d826cb93dcce292180de6fc2be66a7872.zip
feat(openapi): Add openapi method routes
Diffstat (limited to 'server/core')
-rw-r--r--server/core/src/main/kotlin/moe/nea/ledger/server/core/Application.kt3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/core/src/main/kotlin/moe/nea/ledger/server/core/Application.kt b/server/core/src/main/kotlin/moe/nea/ledger/server/core/Application.kt
index 0f13606..56492db 100644
--- a/server/core/src/main/kotlin/moe/nea/ledger/server/core/Application.kt
+++ b/server/core/src/main/kotlin/moe/nea/ledger/server/core/Application.kt
@@ -6,6 +6,8 @@ import io.ktor.server.application.install
import io.ktor.server.netty.EngineMain
import io.ktor.server.plugins.compression.Compression
import io.ktor.server.plugins.contentnegotiation.ContentNegotiation
+import io.ktor.server.response.respondRedirect
+import io.ktor.server.routing.get
import io.ktor.server.routing.route
import io.ktor.server.routing.routing
import kotlinx.serialization.json.Json
@@ -43,6 +45,7 @@ fun Application.module() {
routing {
route("/api") {
this.apiRouting(database)
+ get { call.respondRedirect("/openapi/") }
}
route("/api.json") {
openApiDocsJson()