mirror of
https://github.com/penpot/penpot.git
synced 2025-05-27 19:26:11 +02:00
🎉 Add conditional reading to RPC
This commit is contained in:
parent
5192b36669
commit
fde03e21b0
12 changed files with 242 additions and 90 deletions
|
@ -18,6 +18,7 @@
|
|||
[app.rpc :as-alias rpc]
|
||||
[app.rpc.climit :as climit]
|
||||
[app.rpc.doc :as-alias doc]
|
||||
[app.rpc.helpers :as rph]
|
||||
[app.rpc.mutations.teams :as teams]
|
||||
[app.rpc.queries.profile :as profile]
|
||||
[app.tokens :as tokens]
|
||||
|
@ -135,10 +136,10 @@
|
|||
{:invitation-token (:invitation-token params)}
|
||||
profile)]
|
||||
|
||||
(with-meta response
|
||||
{::rpc/transform-response (session/create-fn session (:id profile))
|
||||
::audit/props (audit/profile->props profile)
|
||||
::audit/profile-id (:id profile)})))))
|
||||
(-> response
|
||||
(rph/with-transform (session/create-fn session (:id profile)))
|
||||
(vary-meta merge {::audit/props (audit/profile->props profile)
|
||||
::audit/profile-id (:id profile)}))))))
|
||||
|
||||
(s/def ::login-with-password
|
||||
(s/keys :req-un [::email ::password]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue