File tree 3 files changed +13
-13
lines changed
src/main/kotlin/no/java/conf/plugins
3 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 1
1
plugins {
2
2
alias(libs.plugins.kotlin.jvm)
3
3
alias(libs.plugins.ktor)
4
- // https://github.com/jeremymailen/kotlinter-gradle/issues/414
5
- // alias(libs.plugins.kotlinter)
4
+ alias(libs.plugins.kotlinter)
6
5
alias(libs.plugins.detekt)
7
6
alias(libs.plugins.versions)
8
7
alias(libs.plugins.serialization)
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ logback-version = "1.5.12"
6
6
prometheus-version = " 1.14.1"
7
7
gradle_versions_filter_version = " 0.1.16"
8
8
detekt_version = " 1.23.7"
9
- kotlinter_version = " 4.5 .0"
9
+ kotlinter_version = " 5.0 .0"
10
10
kotlin_logging_version = " 7.0.0"
11
11
arrow_version = " 1.2.4"
12
12
search_client_version = " 2.3.2"
Original file line number Diff line number Diff line change @@ -10,16 +10,17 @@ import no.java.conf.model.ApiError
10
10
suspend inline fun <reified A : Any > Either <ApiError , A >.respond (
11
11
context : RoutingContext ,
12
12
status : HttpStatusCode = HttpStatusCode .OK
13
- ) =
14
- when (this ) {
15
- is Either .Left -> context.respond(value)
16
- is Either .Right -> context.call.respond(status, value)
17
- }
13
+ ) = when (this ) {
14
+ is Either .Left -> context.respond(value)
15
+ is Either .Right -> context.call.respond(status, value)
16
+ }
18
17
19
18
suspend fun RoutingContext.respond (error : ApiError ) = call.respond(error.statusCode, error.messageMap())
20
19
21
- suspend inline fun <reified A : Any > Either <ApiError , A >.respondRedirect (context : RoutingContext , url : String ) =
22
- when (this ) {
23
- is Either .Left -> context.respond(value)
24
- is Either .Right -> context.call.respondRedirect(url)
25
- }
20
+ suspend inline fun <reified A : Any > Either <ApiError , A >.respondRedirect (
21
+ context : RoutingContext ,
22
+ url : String
23
+ ) = when (this ) {
24
+ is Either .Left -> context.respond(value)
25
+ is Either .Right -> context.call.respondRedirect(url)
26
+ }
You can’t perform that action at this time.
0 commit comments