Skip to content

Commit

Permalink
[#3980] Remove suspends from ktor methods (#3982)
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaozhan authored Sep 26, 2024
1 parent 382293d commit 82d7035
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
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 suspend fun Route.getCurrencyByName(
internal fun Route.getCurrencyByName(
apiController: APIController
) = get(PATH_BY_BASE) {
Logger.v { "GET Request $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 suspend fun Route.getError() = get(PATH_ERROR) {
internal fun Route.getError() = get(PATH_ERROR) {
Logger.v { "GET Request $PATH_ERROR" }

javaClass.classLoader?.getResource(ERROR_HTML)?.readText()?.let { resource ->
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 suspend fun Route.getRoot() = get(PATH_ROOT) {
internal fun Route.getRoot() = get(PATH_ROOT) {
Logger.v { "GET Request $PATH_ROOT" }

javaClass.classLoader?.getResource(INDEX_HTML)?.readText()?.let { resource ->
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 suspend fun Route.getVersion() = get(PATH_VERSION) {
internal fun Route.getVersion() = get(PATH_VERSION) {
Logger.v { "GET Request $PATH_VERSION" }

call.respondText(
Expand Down

0 comments on commit 82d7035

Please sign in to comment.