mirror of
https://github.com/penpot/penpot.git
synced 2025-02-14 19:19:09 -05:00
✨ Do not wrap in sm/define on rpc methods
Because is redundant operation
This commit is contained in:
parent
a9e7ed57d9
commit
3001476dbc
1 changed files with 1 additions and 6 deletions
|
@ -139,15 +139,10 @@
|
||||||
(f cfg (us/conform spec params)))
|
(f cfg (us/conform spec params)))
|
||||||
f)))
|
f)))
|
||||||
|
|
||||||
;; TODO: integrate with sm/define
|
|
||||||
|
|
||||||
(defn- wrap-params-validation
|
(defn- wrap-params-validation
|
||||||
[_ f mdata]
|
[_ f mdata]
|
||||||
(if-let [schema (::sm/params mdata)]
|
(if-let [schema (::sm/params mdata)]
|
||||||
(let [schema (if (sm/lazy-schema? schema)
|
(let [validate (sm/validator schema)
|
||||||
schema
|
|
||||||
(sm/define schema))
|
|
||||||
validate (sm/validator schema)
|
|
||||||
explain (sm/explainer schema)
|
explain (sm/explainer schema)
|
||||||
decode (sm/decoder schema)]
|
decode (sm/decoder schema)]
|
||||||
(fn [cfg params]
|
(fn [cfg params]
|
||||||
|
|
Loading…
Add table
Reference in a new issue