From e4e10f76f7b14408769a770b16babee37f7ac969 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Sat, 28 Sep 2024 13:26:31 +0200 Subject: [PATCH] [Oztechan/CCC#3991] Rename routes (#3992) --- .../oztechan/ccc/backend/app/module/APIModule.kt | 16 ++++++++-------- .../ccc/backend/app/routes/CurrencyRoute.kt | 2 +- .../ccc/backend/app/routes/ErrorRoute.kt | 2 +- .../oztechan/ccc/backend/app/routes/RootRoute.kt | 2 +- .../ccc/backend/app/routes/VersionRoute.kt | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/backend/app/src/main/kotlin/com/oztechan/ccc/backend/app/module/APIModule.kt b/backend/app/src/main/kotlin/com/oztechan/ccc/backend/app/module/APIModule.kt index ce7ce79e62..a6d21ffde9 100644 --- a/backend/app/src/main/kotlin/com/oztechan/ccc/backend/app/module/APIModule.kt +++ b/backend/app/src/main/kotlin/com/oztechan/ccc/backend/app/module/APIModule.kt @@ -1,10 +1,10 @@ package com.oztechan.ccc.backend.app.module import co.touchlab.kermit.Logger -import com.oztechan.ccc.backend.app.routes.getCurrencyByName -import com.oztechan.ccc.backend.app.routes.getError -import com.oztechan.ccc.backend.app.routes.getRoot -import com.oztechan.ccc.backend.app.routes.getVersion +import com.oztechan.ccc.backend.app.routes.currency +import com.oztechan.ccc.backend.app.routes.error +import com.oztechan.ccc.backend.app.routes.root +import com.oztechan.ccc.backend.app.routes.version import com.oztechan.ccc.backend.controller.api.APIController import com.oztechan.ccc.common.core.infrastructure.di.DISPATCHER_IO import io.ktor.serialization.kotlinx.json.json @@ -32,10 +32,10 @@ internal fun Application.apiModule() { routing { globalScope.launch(ioDispatcher) { - getError() - getRoot() - getCurrencyByName(apiController) - getVersion() + root() + currency(apiController) + version() + error() } } } diff --git a/backend/app/src/main/kotlin/com/oztechan/ccc/backend/app/routes/CurrencyRoute.kt b/backend/app/src/main/kotlin/com/oztechan/ccc/backend/app/routes/CurrencyRoute.kt index 283b2f06d9..7a369e6166 100644 --- a/backend/app/src/main/kotlin/com/oztechan/ccc/backend/app/routes/CurrencyRoute.kt +++ b/backend/app/src/main/kotlin/com/oztechan/ccc/backend/app/routes/CurrencyRoute.kt @@ -15,7 +15,7 @@ import io.ktor.server.routing.get private const val PATH_BY_BASE = "/currency/byBase/" private const val PARAMETER_BASE = "base" -internal fun Route.getCurrencyByName( +internal fun Route.currency( apiController: APIController ) { get(PATH_BY_BASE) { diff --git a/backend/app/src/main/kotlin/com/oztechan/ccc/backend/app/routes/ErrorRoute.kt b/backend/app/src/main/kotlin/com/oztechan/ccc/backend/app/routes/ErrorRoute.kt index 4a769ff5c5..0df232a3e5 100644 --- a/backend/app/src/main/kotlin/com/oztechan/ccc/backend/app/routes/ErrorRoute.kt +++ b/backend/app/src/main/kotlin/com/oztechan/ccc/backend/app/routes/ErrorRoute.kt @@ -16,7 +16,7 @@ import io.ktor.server.routing.get private const val PATH_ERROR = "/error" private const val ERROR_HTML = "error.html" -internal fun Route.getError() { +internal fun Route.error() { get(PATH_ERROR) { Logger.v { "GET Request $PATH_ERROR" } diff --git a/backend/app/src/main/kotlin/com/oztechan/ccc/backend/app/routes/RootRoute.kt b/backend/app/src/main/kotlin/com/oztechan/ccc/backend/app/routes/RootRoute.kt index 90e6834d47..0c7d6673fb 100644 --- a/backend/app/src/main/kotlin/com/oztechan/ccc/backend/app/routes/RootRoute.kt +++ b/backend/app/src/main/kotlin/com/oztechan/ccc/backend/app/routes/RootRoute.kt @@ -16,7 +16,7 @@ import io.ktor.server.routing.get private const val PATH_ROOT = "/" private const val INDEX_HTML = "index.html" -internal fun Route.getRoot() { +internal fun Route.root() { get(PATH_ROOT) { Logger.v { "GET Request $PATH_ROOT" } diff --git a/backend/app/src/main/kotlin/com/oztechan/ccc/backend/app/routes/VersionRoute.kt b/backend/app/src/main/kotlin/com/oztechan/ccc/backend/app/routes/VersionRoute.kt index b6e6e648a5..6a9fc312ae 100644 --- a/backend/app/src/main/kotlin/com/oztechan/ccc/backend/app/routes/VersionRoute.kt +++ b/backend/app/src/main/kotlin/com/oztechan/ccc/backend/app/routes/VersionRoute.kt @@ -10,7 +10,7 @@ import io.ktor.server.routing.get private const val PATH_VERSION = "/version" -internal fun Route.getVersion() { +internal fun Route.version() { get(PATH_VERSION) { Logger.v { "GET Request $PATH_VERSION" }