diff options
Diffstat (limited to 'kvision-modules/kvision-server-jooby')
-rw-r--r-- | kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt index df8d20c7..ac799769 100644 --- a/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt +++ b/kvision-modules/kvision-server-jooby/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt @@ -465,24 +465,26 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass: */ @Suppress("TooGenericExceptionCaught") protected actual inline fun <reified RET> bindTabulatorRemote( - noinline function: suspend T.(Int?, Int?, List<RemoteFilter>?, List<RemoteSorter>?) -> RemoteData<RET> + noinline function: suspend T.(Int?, Int?, List<RemoteFilter>?, List<RemoteSorter>?, String?) -> RemoteData<RET> ) { val routeDef = "route${this::class.simpleName}${counter++}" routes.add { call(HttpMethod.POST, "/kv/$routeDef") { req, res -> val jsonRpcRequest = req.body(JsonRpcRequest::class.java) @Suppress("MagicNumber") - if (jsonRpcRequest.params.size == 4) { + if (jsonRpcRequest.params.size == 5) { val param1 = getParameter<Int?>(jsonRpcRequest.params[0]) val param2 = getParameter<Int?>(jsonRpcRequest.params[1]) val param3 = getParameter<List<RemoteFilter>?>(jsonRpcRequest.params[2]) @Suppress("MagicNumber") val param4 = getParameter<List<RemoteSorter>?>(jsonRpcRequest.params[3]) + @Suppress("MagicNumber") + val param5 = getParameter<String?>(jsonRpcRequest.params[4]) val injector = req.require(Injector::class.java) val service = injector.getInstance(serviceClass.java) GlobalScope.launch(start = CoroutineStart.UNDISPATCHED) { try { - val result = function.invoke(service, param1, param2, param3, param4) + val result = function.invoke(service, param1, param2, param3, param4, param5) res.send( JsonRpcResponse( id = jsonRpcRequest.id, |