diff options
Diffstat (limited to 'kvision-modules/kvision-server-spring-boot/src/main/kotlin/pl')
2 files changed, 6 insertions, 11 deletions
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 /** @@ -36,11 +35,6 @@ import kotlinx.coroutines.async as coroutinesAsync actual open class KVServer(val services: List<KVServiceManager<*>>) /** - * A server request. - */ -actual typealias Request = HttpServletRequest - -/** * A user profile. */ actual typealias Profile = CommonProfile 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<T : Any> actual constructor(val serviceClass: val LOG: Logger = LoggerFactory.getLogger(KVServiceManager::class.java.name) } - val postRequests: MutableMap<String, (Request, HttpServletResponse) -> Unit> = mutableMapOf() - val putRequests: MutableMap<String, (Request, HttpServletResponse) -> Unit> = mutableMapOf() - val deleteRequests: MutableMap<String, (Request, HttpServletResponse) -> Unit> = mutableMapOf() - val optionsRequests: MutableMap<String, (Request, HttpServletResponse) -> Unit> = mutableMapOf() + val postRequests: MutableMap<String, (HttpServletRequest, HttpServletResponse) -> Unit> = mutableMapOf() + val putRequests: MutableMap<String, (HttpServletRequest, HttpServletResponse) -> Unit> = mutableMapOf() + val deleteRequests: MutableMap<String, (HttpServletRequest, HttpServletResponse) -> Unit> = mutableMapOf() + val optionsRequests: MutableMap<String, (HttpServletRequest, HttpServletResponse) -> Unit> = mutableMapOf() val mapper = jacksonObjectMapper().apply { dateFormat = SimpleDateFormat(KV_DATE_FORMAT) @@ -426,7 +427,7 @@ actual open class KVServiceManager<T : Any> 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 |