♻️ Refactor comments RPC methods and add tests

This commit is contained in:
Andrey Antukh 2022-12-30 00:27:05 +01:00
parent 73a3e0c0ae
commit 27451b9796
10 changed files with 571 additions and 233 deletions

View file

@ -323,7 +323,9 @@
[{:keys [::type] :as data}]
(let [method-fn (get-in *system* [:app.rpc/methods :commands type])]
;; (app.common.pprint/pprint (:app.rpc/methods *system*))
(try-on! (method-fn (dissoc data ::type)))))
(try-on! (method-fn (-> data
(dissoc ::type)
(assoc :app.rpc/request-at (dt/now)))))))
(defn mutation!
[{:keys [::type profile-id] :as data}]