aboutsummaryrefslogtreecommitdiff
path: root/kvision-server
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2018-06-02 00:43:22 +0200
committerRobert Jaros <rjaros@finn.pl>2018-06-02 00:43:22 +0200
commit95a19c114afa9f19ad3fae902efab7eecb724ae0 (patch)
treebe75b886c47655bc606ecfe2e9bf4ae8b3219e09 /kvision-server
parent9fa8b60b4dccfbe890814fba77d2f31652409389 (diff)
downloadkvision-95a19c114afa9f19ad3fae902efab7eecb724ae0.tar.gz
kvision-95a19c114afa9f19ad3fae902efab7eecb724ae0.tar.bz2
kvision-95a19c114afa9f19ad3fae902efab7eecb724ae0.zip
Style fixes
Diffstat (limited to 'kvision-server')
-rw-r--r--kvision-server/src/main/kotlin/pl/treksoft/kvision/remote/ServiceManager.kt12
1 files changed, 6 insertions, 6 deletions
diff --git a/kvision-server/src/main/kotlin/pl/treksoft/kvision/remote/ServiceManager.kt b/kvision-server/src/main/kotlin/pl/treksoft/kvision/remote/ServiceManager.kt
index 50ef770f..0ff01d04 100644
--- a/kvision-server/src/main/kotlin/pl/treksoft/kvision/remote/ServiceManager.kt
+++ b/kvision-server/src/main/kotlin/pl/treksoft/kvision/remote/ServiceManager.kt
@@ -54,7 +54,7 @@ actual open class ServiceManager<out T> actual constructor(val service: T) {
noinline function: T.(Request?) -> Deferred<RET>,
route: String?, method: RpcHttpMethod, prefix: String
) {
- val routeDef = if (route != null) route else "route${this::class.simpleName}${counter++}"
+ val routeDef = route ?: "route${this::class.simpleName}${counter++}"
routes.add({
call(method, "$prefix$routeDef") { req, res ->
if (service != null) {
@@ -89,7 +89,7 @@ actual open class ServiceManager<out T> actual constructor(val service: T) {
noinline function: T.(PAR, Request?) -> Deferred<RET>,
route: String?, method: RpcHttpMethod, prefix: String
) {
- val routeDef = if (route != null) route else "route${this::class.simpleName}${counter++}"
+ val routeDef = route ?: "route${this::class.simpleName}${counter++}"
routes.add({
call(method, "$prefix$routeDef") { req, res ->
if (service != null) {
@@ -129,7 +129,7 @@ actual open class ServiceManager<out T> actual constructor(val service: T) {
noinline function: T.(PAR1, PAR2, Request?) -> Deferred<RET>,
route: String?, method: RpcHttpMethod, prefix: String
) {
- val routeDef = if (route != null) route else "route${this::class.simpleName}${counter++}"
+ val routeDef = route ?: "route${this::class.simpleName}${counter++}"
routes.add({
call(method, "$prefix$routeDef") { req, res ->
if (service != null) {
@@ -170,7 +170,7 @@ actual open class ServiceManager<out T> actual constructor(val service: T) {
noinline function: T.(PAR1, PAR2, PAR3, Request?) -> Deferred<RET>,
route: String?, method: RpcHttpMethod, prefix: String
) {
- val routeDef = if (route != null) route else "route${this::class.simpleName}${counter++}"
+ val routeDef = route ?: "route${this::class.simpleName}${counter++}"
routes.add({
call(method, "$prefix$routeDef") { req, res ->
if (service != null) {
@@ -212,7 +212,7 @@ actual open class ServiceManager<out T> actual constructor(val service: T) {
noinline function: T.(PAR1, PAR2, PAR3, PAR4, Request?) -> Deferred<RET>,
route: String?, method: RpcHttpMethod, prefix: String
) {
- val routeDef = if (route != null) route else "route${this::class.simpleName}${counter++}"
+ val routeDef = route ?: "route${this::class.simpleName}${counter++}"
routes.add({
call(method, "$prefix$routeDef") { req, res ->
if (service != null) {
@@ -259,7 +259,7 @@ actual open class ServiceManager<out T> actual constructor(val service: T) {
method: RpcHttpMethod,
prefix: String
) {
- val routeDef = if (route != null) route else "route${this::class.simpleName}${counter++}"
+ val routeDef = route ?: "route${this::class.simpleName}${counter++}"
routes.add({
call(method, "$prefix$routeDef") { req, res ->
if (service != null) {