From 3001476dbcec8c869db874de79895c169a2bffb3 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 26 Jan 2024 11:04:36 +0100 Subject: [PATCH] :sparkles: Do not wrap in sm/define on rpc methods Because is redundant operation --- backend/src/app/rpc.clj | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/backend/src/app/rpc.clj b/backend/src/app/rpc.clj index 69f9d84fb..f9c36515a 100644 --- a/backend/src/app/rpc.clj +++ b/backend/src/app/rpc.clj @@ -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]