aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-server-ktor/src/main/kotlin
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-11-07 13:33:07 +0100
committerRobert Jaros <rjaros@finn.pl>2019-11-07 13:33:07 +0100
commit4bd650eff23bb3c4892b75df33597d8368c14cf3 (patch)
tree76b5241873e7c4f660688c52c173a7fa0eaa9d0d /kvision-modules/kvision-server-ktor/src/main/kotlin
parentb635f78389cd032ead73a771a6fb8a02b2273159 (diff)
downloadkvision-4bd650eff23bb3c4892b75df33597d8368c14cf3.tar.gz
kvision-4bd650eff23bb3c4892b75df33597d8368c14cf3.tar.bz2
kvision-4bd650eff23bb3c4892b75df33597d8368c14cf3.zip
Send additional state with TabulatorRemote request
Diffstat (limited to 'kvision-modules/kvision-server-ktor/src/main/kotlin')
-rw-r--r--kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt8
1 files changed, 5 insertions, 3 deletions
diff --git a/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt b/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
index 8b766aee..ec487e08 100644
--- a/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
+++ b/kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt
@@ -497,21 +497,23 @@ 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++}"
addRoute(HttpMethod.POST, "/kv/$routeDef") {
val service = call.injector.createChildInjector(DummyWsSessionModule()).getInstance(serviceClass.java)
val jsonRpcRequest = call.receive<JsonRpcRequest>()
@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])
try {
- val result = function.invoke(service, param1, param2, param3, param4)
+ val result = function.invoke(service, param1, param2, param3, param4, param5)
call.respond(
JsonRpcResponse(
id = jsonRpcRequest.id,