0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 14:12:36 -05:00

💄 Add minor cosmetic changes to verify-token ns

This commit is contained in:
Andrey Antukh 2024-11-13 12:28:37 +01:00
parent 1c49dd80a4
commit c0f026c332

View file

@ -167,18 +167,24 @@
(let [props {:team-id (:team-id claims) (let [props {:team-id (:team-id claims)
:role (:role claims) :role (:role claims)
:invitation-id (:id invitation)} :invitation-id (:id invitation)}
event (-> (audit/event-from-rpc-params params)
(assoc ::audit/name "accept-team-invitation") accept-invitation-event
(assoc ::audit/props props)) (-> (audit/event-from-rpc-params params)
ev-invitation-from (-> (audit/event-from-rpc-params params) (assoc ::audit/name "accept-team-invitation")
(assoc ::audit/profile-id (:created-by invitation)) (assoc ::audit/props props))
(assoc ::audit/name "accept-team-invitation-from")
(assoc ::audit/props (assoc props :profile-id (:id profile) accept-invitation-from-event
:email (:email profile))))] (-> (audit/event-from-rpc-params params)
(assoc ::audit/profile-id (:created-by invitation))
(assoc ::audit/name "accept-team-invitation-from")
(assoc ::audit/props (assoc props
:profile-id (:id profile)
:email (:email profile))))]
(audit/submit! cfg accept-invitation-event)
(audit/submit! cfg accept-invitation-from-event)
(accept-invitation cfg claims invitation profile) (accept-invitation cfg claims invitation profile)
(audit/submit! cfg event)
(audit/submit! cfg ev-invitation-from)
(assoc claims :state :created)) (assoc claims :state :created))
(ex/raise :type :validation (ex/raise :type :validation