From 90a6caea41700447a040c500f8cdff0c564224e5 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sat, 16 May 2020 01:22:21 +0200 Subject: Fix warnings --- src/main/kotlin/pl/treksoft/kvision/rest/RestClient.kt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/main/kotlin') diff --git a/src/main/kotlin/pl/treksoft/kvision/rest/RestClient.kt b/src/main/kotlin/pl/treksoft/kvision/rest/RestClient.kt index e55249cc..b50be0f3 100644 --- a/src/main/kotlin/pl/treksoft/kvision/rest/RestClient.kt +++ b/src/main/kotlin/pl/treksoft/kvision/rest/RestClient.kt @@ -132,8 +132,8 @@ open class RestClient { contentType: String = "application/json", beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null ): Promise { - val data = if (method == HttpMethod.GET) data.toObj(serializer) else JSON.plain.stringify(serializer, data) - return remoteCall(url, data, method, contentType, beforeSend) + val dataSer = if (method == HttpMethod.GET) data.toObj(serializer) else JSON.plain.stringify(serializer, data) + return remoteCall(url, dataSer, method, contentType, beforeSend) } @@ -159,10 +159,10 @@ open class RestClient { beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null, transform: ((dynamic) -> dynamic)? = null ): Promise { - val data = if (method == HttpMethod.GET) data.toObj(serializer) else JSON.plain.stringify(serializer, data) + val dataSer = if (method == HttpMethod.GET) data.toObj(serializer) else JSON.plain.stringify(serializer, data) return remoteCall( url, - data, + dataSer, method, contentType, beforeSend @@ -422,8 +422,8 @@ open class RestClient { contentType: String = "application/json", beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null ): Promise> { - val data = if (method == HttpMethod.GET) data.toObj(serializer) else JSON.plain.stringify(serializer, data) - return remoteRequest(url, data, method, contentType, beforeSend) + val dataSer = if (method == HttpMethod.GET) data.toObj(serializer) else JSON.plain.stringify(serializer, data) + return remoteRequest(url, dataSer, method, contentType, beforeSend) } @@ -449,10 +449,10 @@ open class RestClient { beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null, transform: ((dynamic) -> dynamic)? = null ): Promise> { - val data = if (method == HttpMethod.GET) data.toObj(serializer) else JSON.plain.stringify(serializer, data) + val dataSer = if (method == HttpMethod.GET) data.toObj(serializer) else JSON.plain.stringify(serializer, data) return remoteRequest( url, - data, + dataSer, method, contentType, beforeSend -- cgit