Skip to content
Snippets Groups Projects
Commit c08d8533 authored by Cam Saul's avatar Cam Saul
Browse files

slightly faster API format middleware

parent 8e80bf41
No related branches found
No related tags found
No related merge requests found
......@@ -21,8 +21,8 @@
(defn- remove-fns-and-delays
"Remove values that are fns or delays from map M."
[m]
(filter-vals #(and (not (fn? %))
(not (delay? %)))
(filter-vals #(not (or (delay? %)
(fn? %)))
m))
(defn- clob? [obj]
......@@ -31,7 +31,7 @@
(defn- -format-response [obj]
(cond
(map? obj) (->> (remove-fns-and-delays obj) ; recurse over all vals in the map
(map-vals -format-response))
(map-vals -format-response))
(coll? obj) (map -format-response obj) ; recurse over all items in the collection
(clob? obj) (util/jdbc-clob->str obj)
:else obj))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment