From ec61850780cac4e84826aca95a14d8010813b13a Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Wed, 9 Jan 2019 12:19:18 +0100 Subject: Dependencies upgrade. --- .../src/main/kotlin/pl/treksoft/kvision/remote/KVServer.kt | 6 ------ .../kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt | 11 ++++++----- 2 files changed, 6 insertions(+), 11 deletions(-) (limited to 'kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl') diff --git a/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVServer.kt b/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVServer.kt index ba7264e8..b0052be0 100644 --- a/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVServer.kt +++ b/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVServer.kt @@ -27,7 +27,6 @@ import org.pac4j.core.profile.CommonProfile import org.pac4j.core.profile.ProfileManager import org.springframework.web.context.request.RequestContextHolder import org.springframework.web.context.request.ServletRequestAttributes -import javax.servlet.http.HttpServletRequest import kotlinx.coroutines.async as coroutinesAsync /** @@ -35,11 +34,6 @@ import kotlinx.coroutines.async as coroutinesAsync */ actual open class KVServer(val services: List>) -/** - * A server request. - */ -actual typealias Request = HttpServletRequest - /** * A user profile. */ diff --git a/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt b/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt index 24c6c9db..8513c128 100644 --- a/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt +++ b/kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt @@ -30,6 +30,7 @@ import org.slf4j.Logger import org.slf4j.LoggerFactory import pl.treksoft.kvision.types.KV_DATE_FORMAT import java.text.SimpleDateFormat +import javax.servlet.http.HttpServletRequest import javax.servlet.http.HttpServletResponse import kotlin.reflect.KClass @@ -43,10 +44,10 @@ actual open class KVServiceManager actual constructor(val serviceClass: val LOG: Logger = LoggerFactory.getLogger(KVServiceManager::class.java.name) } - val postRequests: MutableMap Unit> = mutableMapOf() - val putRequests: MutableMap Unit> = mutableMapOf() - val deleteRequests: MutableMap Unit> = mutableMapOf() - val optionsRequests: MutableMap Unit> = mutableMapOf() + val postRequests: MutableMap Unit> = mutableMapOf() + val putRequests: MutableMap Unit> = mutableMapOf() + val deleteRequests: MutableMap Unit> = mutableMapOf() + val optionsRequests: MutableMap Unit> = mutableMapOf() val mapper = jacksonObjectMapper().apply { dateFormat = SimpleDateFormat(KV_DATE_FORMAT) @@ -426,7 +427,7 @@ actual open class KVServiceManager actual constructor(val serviceClass: fun addRoute( method: RpcHttpMethod, path: String, - handler: (Request, HttpServletResponse) -> Unit + handler: (HttpServletRequest, HttpServletResponse) -> Unit ) { when (method) { RpcHttpMethod.POST -> postRequests[path] = handler -- cgit