0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-22 14:39:45 -05:00

Relax transaction requirements on create-team rpc method

This commit is contained in:
Andrey Antukh 2024-10-07 15:08:56 +02:00 committed by Alonso Torres
parent f777845d14
commit c6917bb0cf

View file

@ -401,8 +401,7 @@
(sv/defmethod ::create-team
{::doc/added "1.17"
::sm/params schema:create-team
::db/transaction true}
::sm/params schema:create-team}
[cfg {:keys [::rpc/profile-id] :as params}]
(quotes/check! cfg {::quotes/id ::quotes/teams-per-profile
@ -413,7 +412,7 @@
params (-> params
(assoc :profile-id profile-id)
(assoc :features features))
team (create-team cfg params)]
team (db/tx-run! cfg create-team params)]
(with-meta team
{::audit/props {:id (:id team)}})))