From 434bc25cd6c6eff97888ff7a6fabaa03413d7648 Mon Sep 17 00:00:00 2001 From: Juho Teperi Date: Wed, 11 Jul 2018 09:39:10 +0300 Subject: [PATCH] Format code --- modules/reitit-core/src/reitit/impl.cljc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/reitit-core/src/reitit/impl.cljc b/modules/reitit-core/src/reitit/impl.cljc index 003f2870..c5fca01e 100644 --- a/modules/reitit-core/src/reitit/impl.cljc +++ b/modules/reitit-core/src/reitit/impl.cljc @@ -131,7 +131,10 @@ (defn path-for [^Route route path-params] (if-let [required (:path-params route)] (if (every? #(contains? path-params %) required) - (str "/" (str/join \/ (map #(get (or path-params {}) % %) (:path-parts route))))) + (->> (:path-parts route) + (map #(get (or path-params {}) % %)) + (str/join \/) + (str "/"))) (:path route))) (defn throw-on-missing-path-params [template required path-params] @@ -214,5 +217,8 @@ "shallow transform of query parameters into query string" [params] (->> params - (map (fn [[k v]] (str (url-encode (into-string k)) "=" (url-encode (into-string v))))) + (map (fn [[k v]] + (str (url-encode (into-string k)) + "=" + (url-encode (into-string v))))) (str/join "&")))