mirror of
https://github.com/penpot/penpot.git
synced 2025-03-28 15:41:25 -05:00
⚡ Add minor optimization for d/without-qualified helper
This commit is contained in:
parent
528f0b4f60
commit
e55d1a3b7f
3 changed files with 12 additions and 4 deletions
|
@ -149,9 +149,11 @@
|
|||
(let [params (decode params)]
|
||||
(if (validate params)
|
||||
(f cfg params)
|
||||
(ex/raise :type :validation
|
||||
:code :params-validation
|
||||
::sm/explain (explain params))))))
|
||||
|
||||
(let [params (d/without-qualified params)]
|
||||
(ex/raise :type :validation
|
||||
:code :params-validation
|
||||
::sm/explain (explain params)))))))
|
||||
f))
|
||||
|
||||
(defn- wrap-output-validation
|
||||
|
|
|
@ -242,7 +242,12 @@
|
|||
([]
|
||||
(remove (comp qualified-keyword? key)))
|
||||
([data]
|
||||
(into {} (without-qualified) data)))
|
||||
(reduce-kv (fn [data k _]
|
||||
(if (qualified-keyword? k)
|
||||
(dissoc data k)
|
||||
data))
|
||||
data
|
||||
data)))
|
||||
|
||||
(defn without-keys
|
||||
"Return a map without the keys provided
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
"application/zip" ".zip"
|
||||
"application/penpot" ".penpot"
|
||||
"application/pdf" ".pdf"
|
||||
"text/plain" ".txt"
|
||||
nil))
|
||||
|
||||
(s/def ::id uuid?)
|
||||
|
|
Loading…
Add table
Reference in a new issue