From 48711fb558816120139f2c0c2ec6f1591d787151 Mon Sep 17 00:00:00 2001 From: khaled basbous Date: Thu, 13 Jul 2023 11:02:01 +0200 Subject: [PATCH] Fix kondo reported warnings --- src/cljc/sixsq/nuvla/client/async.cljc | 4 ++-- src/cljc/sixsq/nuvla/client/impl/async.cljc | 12 ++++++------ src/cljc/sixsq/nuvla/client/impl/utils/cimi.cljc | 6 +++--- .../sixsq/nuvla/client/impl/utils/http_async.cljc | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/cljc/sixsq/nuvla/client/async.cljc b/src/cljc/sixsq/nuvla/client/async.cljc index 1564033..5bad805 100644 --- a/src/cljc/sixsq/nuvla/client/async.cljc +++ b/src/cljc/sixsq/nuvla/client/async.cljc @@ -5,8 +5,8 @@ (:refer-clojure :exclude [get]) #?(:cljs (:require-macros [cljs.core.async.macros :refer [go]])) (:require - [clojure.core.async :refer #?(:clj [chan >! ! !])] + :cljs [chan (cu/req-opts token) - (merge options) - assoc-chan)] - (http/get url opts)))) + (let [url (cu/ensure-url (:base-uri cep) url-or-id) + opts (-> (cu/req-opts token) + (merge options) + assoc-chan)] + (http/get url opts))) (defn get-sse diff --git a/src/cljc/sixsq/nuvla/client/impl/utils/cimi.cljc b/src/cljc/sixsq/nuvla/client/impl/utils/cimi.cljc index a7b9b58..2bee1cf 100644 --- a/src/cljc/sixsq/nuvla/client/impl/utils/cimi.cljc +++ b/src/cljc/sixsq/nuvla/client/impl/utils/cimi.cljc @@ -61,7 +61,7 @@ "This extracts the HTTP response body (rendered as keywordized EDN) and the value of the set-cookie header and returns a tuple with the two values in that order." - [{:keys [body] {:keys [set-cookie]} :headers :as response}] + [{:keys [body] {:keys [set-cookie]} :headers :as _response}] [(json/json->edn body) set-cookie]) @@ -111,7 +111,7 @@ "Extracts the absolute URL for the named collection from the cloud entry point. The collection name can be provided either as a string or a keyword (preferred). Returns nil if the collection does not exist." - [{:keys [base-uri collections] :as cep} collection-name] + [{:keys [base-uri collections] :as _cep} collection-name] (when (and base-uri collection-name) (let [collection (keyword collection-name)] (some->> collections @@ -124,7 +124,7 @@ "Verifies that the value of `collection-url` is the URL for one of the collections defined in the cloud entry point. If it is, then the URL is returned; if not, then nil is returned." - [{:keys [base-uri collections] :as cep} collection-url] + [{:keys [base-uri collections] :as _cep} collection-url] (when (and base-uri collection-url) (let [collection-urls-set (->> collections vals diff --git a/src/cljc/sixsq/nuvla/client/impl/utils/http_async.cljc b/src/cljc/sixsq/nuvla/client/impl/utils/http_async.cljc index 8594340..bbc73db 100644 --- a/src/cljc/sixsq/nuvla/client/impl/utils/http_async.cljc +++ b/src/cljc/sixsq/nuvla/client/impl/utils/http_async.cljc @@ -47,5 +47,5 @@ (request-async! :delete url req)) (defn sse - [url & [{:keys [options] :as opts}]] + [url & [opts]] (request-event-source! url opts))