mirror of
https://github.com/penpot/penpot.git
synced 2025-01-23 23:18:48 -05:00
🐛 Fix params inconsistency between mutation and commands
This commit is contained in:
parent
4b26b6fc02
commit
f47c20e079
1 changed files with 3 additions and 3 deletions
|
@ -105,7 +105,7 @@
|
||||||
"Ring handler that dispatches cmd requests and convert between
|
"Ring handler that dispatches cmd requests and convert between
|
||||||
internal async flow into ring async flow."
|
internal async flow into ring async flow."
|
||||||
[methods {:keys [profile-id session-id params] :as request} respond raise]
|
[methods {:keys [profile-id session-id params] :as request} respond raise]
|
||||||
(let [cmd (keyword (:command params))
|
(let [cmd (keyword (:type params))
|
||||||
etag (yrq/get-header request "if-none-match")
|
etag (yrq/get-header request "if-none-match")
|
||||||
data (into {::http/request request ::cond/key etag} params)
|
data (into {::http/request request ::cond/key etag} params)
|
||||||
data (if profile-id
|
data (if profile-id
|
||||||
|
@ -212,7 +212,7 @@
|
||||||
|
|
||||||
(l/debug :hint "register method" :name (::sv/name mdata))
|
(l/debug :hint "register method" :name (::sv/name mdata))
|
||||||
(with-meta
|
(with-meta
|
||||||
(fn [{:keys [::request] :as params}]
|
(fn [params]
|
||||||
;; Raise authentication error when rpc method requires auth but
|
;; Raise authentication error when rpc method requires auth but
|
||||||
;; no profile-id is found in the request.
|
;; no profile-id is found in the request.
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@
|
||||||
(defmethod ig/init-key ::routes
|
(defmethod ig/init-key ::routes
|
||||||
[_ {:keys [methods] :as cfg}]
|
[_ {:keys [methods] :as cfg}]
|
||||||
[["/rpc"
|
[["/rpc"
|
||||||
["/command/:command" {:handler (partial rpc-command-handler (:commands methods))}]
|
["/command/:type" {:handler (partial rpc-command-handler (:commands methods))}]
|
||||||
["/query/:type" {:handler (partial rpc-query-handler (:queries methods))}]
|
["/query/:type" {:handler (partial rpc-query-handler (:queries methods))}]
|
||||||
["/mutation/:type" {:handler (partial rpc-mutation-handler (:mutations methods))
|
["/mutation/:type" {:handler (partial rpc-mutation-handler (:mutations methods))
|
||||||
:allowed-methods #{:post}}]]])
|
:allowed-methods #{:post}}]]])
|
||||||
|
|
Loading…
Add table
Reference in a new issue