aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-server-ktor
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-10-24 19:54:16 +0200
committerRobert Jaros <rjaros@finn.pl>2019-10-24 19:54:16 +0200
commit33215e5c31b55617edf0d95e47e9e720fe4b9dd6 (patch)
tree11e90cbfaacf37dbe1ce4fd8ce3eb28d02dd4867 /kvision-modules/kvision-server-ktor
parent69958b1a08f46aecd6ceda54780f362019150052 (diff)
downloadkvision-33215e5c31b55617edf0d95e47e9e720fe4b9dd6.tar.gz
kvision-33215e5c31b55617edf0d95e47e9e720fe4b9dd6.tar.bz2
kvision-33215e5c31b55617edf0d95e47e9e720fe4b9dd6.zip
Allow suspending functions for SelectRemote and TabulatorRemote components.
Diffstat (limited to 'kvision-modules/kvision-server-ktor')
-rw-r--r--kvision-modules/kvision-server-ktor/src/main/kotlin/pl/treksoft/kvision/remote/KVServiceManager.kt8
1 files changed, 4 insertions, 4 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 e550be9c..4d19e301 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
@@ -442,8 +442,8 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
* @param function a function of the receiver
*/
@Suppress("TooGenericExceptionCaught")
- protected actual fun bind(
- function: T.(String?, String?, String?) -> List<RemoteOption>
+ protected actual fun bindSelectRemote(
+ function: suspend T.(String?, String?, String?) -> List<RemoteOption>
) {
val routeDef = "route${this::class.simpleName}${counter++}"
addRoute(HttpMethod.POST, "/kv/$routeDef") {
@@ -486,8 +486,8 @@ actual open class KVServiceManager<T : Any> actual constructor(val serviceClass:
* @param function a function of the receiver
*/
@Suppress("TooGenericExceptionCaught")
- protected actual inline fun <reified RET> bind(
- noinline function: T.(Int?, Int?, List<RemoteFilter>?, List<RemoteSorter>?) -> RemoteData<RET>
+ protected actual inline fun <reified RET> bindTabulatorRemote(
+ noinline function: suspend T.(Int?, Int?, List<RemoteFilter>?, List<RemoteSorter>?) -> RemoteData<RET>
) {
val routeDef = "route${this::class.simpleName}${counter++}"
addRoute(HttpMethod.POST, "/kv/$routeDef") {