0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-12 18:18:24 -05:00

Do not wrap in sm/define on rpc methods

Because is redundant operation
This commit is contained in:
Andrey Antukh 2024-01-26 11:04:36 +01:00
parent a9e7ed57d9
commit 3001476dbc

View file

@ -139,15 +139,10 @@
(f cfg (us/conform spec params)))
f)))
;; TODO: integrate with sm/define
(defn- wrap-params-validation
[_ f mdata]
(if-let [schema (::sm/params mdata)]
(let [schema (if (sm/lazy-schema? schema)
schema
(sm/define schema))
validate (sm/validator schema)
(let [validate (sm/validator schema)
explain (sm/explainer schema)
decode (sm/decoder schema)]
(fn [cfg params]