Skip to content

Commit e113807

Browse files
authored
GH-1474 Adapt to latest Javalin's breaking changes (#1478)
* Fix missing import * Change to function invocation
1 parent bac22f2 commit e113807

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

reposilite-backend/src/main/kotlin/com/reposilite/frontend/infrastructure/NotFoundHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ internal class NotFoundHandler(private val frontendFacade: FrontendFacade) : Han
2727

2828
private val handler: (Context) -> Unit = { ctx ->
2929
if (ctx.resultString() == null && ctx.resultStream() == null && ctx.resultStream() == null) {
30-
ctx.status(NOT_FOUND).html(frontendFacade.createNotFoundPage(ctx.req.requestURI, ""))
30+
ctx.status(NOT_FOUND).html(frontendFacade.createNotFoundPage(ctx.req().requestURI, ""))
3131
}
3232
}
3333

reposilite-backend/src/main/kotlin/com/reposilite/status/infrastructure/FailureHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import io.javalin.http.ExceptionHandler
2222
internal class FailureHandler(private val failureFacade: FailureFacade) : ExceptionHandler<Exception> {
2323

2424
override fun handle(exception: Exception, context: Context) {
25-
failureFacade.throwException(context.req.requestURI, exception)
25+
failureFacade.throwException(context.req().requestURI, exception)
2626
}
2727

2828
}

reposilite-backend/src/main/kotlin/com/reposilite/token/infrastructure/AccessTokenApiEndpoints.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import com.reposilite.web.routing.RouteMethod.DELETE
3131
import com.reposilite.web.routing.RouteMethod.GET
3232
import com.reposilite.web.routing.RouteMethod.PUT
3333
import io.javalin.http.HttpCode
34+
import io.javalin.http.bodyAsClass
3435
import io.javalin.openapi.HttpMethod
3536
import io.javalin.openapi.OpenApi
3637
import io.javalin.openapi.OpenApiContent

reposilite-backend/src/main/kotlin/com/reposilite/web/application/JavalinConfiguration.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ internal object JavalinConfiguration {
8585
config.http.asyncTimeout = 1000L * 60 * 60 * 10 // 10min
8686

8787
config.core.contextResolvers {
88-
it.ip = { ctx -> ctx.header(webSettings.get().forwardedIp) ?: ctx.req.remoteAddr }
88+
it.ip = { ctx -> ctx.header(webSettings.get().forwardedIp) ?: ctx.req().remoteAddr }
8989
}
9090

9191
when (localConfiguration.compressionStrategy.get().lowercase()) {

0 commit comments

Comments
 (0)