From 93cfdf0dcf6404eb636037fbb59fbff8389a434a Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sat, 2 Jun 2018 00:07:39 +0200 Subject: Generate automatic routes names. --- .../pl/treksoft/kvision/remote/ServiceManager.kt | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'kvision-common/src/main/kotlin/pl/treksoft/kvision') diff --git a/kvision-common/src/main/kotlin/pl/treksoft/kvision/remote/ServiceManager.kt b/kvision-common/src/main/kotlin/pl/treksoft/kvision/remote/ServiceManager.kt index b3db5d0e..1f31dec0 100644 --- a/kvision-common/src/main/kotlin/pl/treksoft/kvision/remote/ServiceManager.kt +++ b/kvision-common/src/main/kotlin/pl/treksoft/kvision/remote/ServiceManager.kt @@ -41,87 +41,87 @@ enum class HttpMethod { /** * Multiplatform service manager. */ -expect open class ServiceManager(service: T? = null) { +expect open class ServiceManager(service: T) { /** * Binds a given route with a function of the receiver. - * @param route a route * @param function a function of the receiver + * @param route a route * @param method a HTTP method * @param prefix an URL address prefix */ protected inline fun bind( - route: String, noinline function: T.(Request?) -> Deferred, + route: String? = null, method: RpcHttpMethod = RpcHttpMethod.POST, prefix: String = "/" ) /** * Binds a given route with a function of the receiver. - * @param route a route * @param function a function of the receiver + * @param route a route * @param method a HTTP method * @param prefix an URL address prefix */ protected inline fun bind( - route: String, noinline function: T.(PAR, Request?) -> Deferred, + route: String? = null, method: RpcHttpMethod = RpcHttpMethod.POST, prefix: String = "/" ) /** * Binds a given route with a function of the receiver. - * @param route a route * @param function a function of the receiver + * @param route a route * @param method a HTTP method * @param prefix an URL address prefix */ protected inline fun bind( - route: String, noinline function: T.(PAR1, PAR2, Request?) -> Deferred, + route: String? = null, method: RpcHttpMethod = RpcHttpMethod.POST, prefix: String = "/" ) /** * Binds a given route with a function of the receiver. - * @param route a route * @param function a function of the receiver + * @param route a route * @param method a HTTP method * @param prefix an URL address prefix */ protected inline fun bind( - route: String, noinline function: T.(PAR1, PAR2, PAR3, Request?) -> Deferred, + route: String? = null, method: RpcHttpMethod = RpcHttpMethod.POST, prefix: String = "/" ) /** * Binds a given route with a function of the receiver. - * @param route a route * @param function a function of the receiver + * @param route a route * @param method a HTTP method * @param prefix an URL address prefix */ protected inline fun bind( - route: String, noinline function: T.(PAR1, PAR2, PAR3, PAR4, Request?) -> Deferred, + route: String? = null, method: RpcHttpMethod = RpcHttpMethod.POST, prefix: String = "/" ) /** * Binds a given route with a function of the receiver. - * @param route a route * @param function a function of the receiver + * @param route a route * @param method a HTTP method * @param prefix an URL address prefix */ protected inline fun bind( - route: String, noinline function: T.(PAR1, PAR2, PAR3, PAR4, PAR5, Request?) -> Deferred, + route: String? = null, method: RpcHttpMethod = RpcHttpMethod.POST, prefix: String = "/" ) -- cgit