diff options
author | Linnea Gräf <nea@nea.moe> | 2025-01-17 13:57:58 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2025-01-17 13:57:58 +0100 |
commit | 8a9f076d826cb93dcce292180de6fc2be66a7872 (patch) | |
tree | f6f92e71ee918d3ea9a55b5392eec52f70d7b747 /server/core | |
parent | e08c8778640967cc086a922f178b18e08b313a29 (diff) | |
download | LocalTransactionLedger-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.kt | 3 |
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() |