Skip to content

Commit

Permalink
[#3991] Rename routes (#3992)
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaozhan authored Sep 28, 2024
1 parent 55280e8 commit e4e10f7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -32,10 +32,10 @@ internal fun Application.apiModule() {

routing {
globalScope.launch(ioDispatcher) {
getError()
getRoot()
getCurrencyByName(apiController)
getVersion()
root()
currency(apiController)
version()
error()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" }

Expand Down

0 comments on commit e4e10f7

Please sign in to comment.