Avoid using callable reference to stay Kotlin 1.0 compatible

This commit is contained in:
Sebastien Deleuze 2017-02-14 23:52:58 +01:00
parent bb9d3e1680
commit 7dd0f358ed
1 changed files with 3 additions and 3 deletions

View File

@ -97,12 +97,12 @@ class RouterFunctionExtensionsTests {
override fun route(req: ServerRequest) = route(req) {
(GET("/foo/") or GET("/foos/")) { handle(req) }
accept(APPLICATION_JSON).apply {
POST("/api/foo/", this@FooController::handleFromClass)
POST("/api/foo/") { handleFromClass(req) }
PUT("/api/foo/") { handleFromClass(req) }
DELETE("/api/foo/", ::handle)
DELETE("/api/foo/") { handleFromClass(req) }
}
html().apply {
GET("/page", this@FooController::handleFromClass)
GET("/page") { handleFromClass(req) }
}
accept(APPLICATION_ATOM_XML, ::handle)
contentType(APPLICATION_OCTET_STREAM) { handle(req) }