mirror of
https://github.com/penpot/penpot.git
synced 2025-03-13 16:21:57 -05:00
🐛 Don't allow remove default teams.
This commit is contained in:
parent
1e35116d8f
commit
e7d1647769
1 changed files with 5 additions and 1 deletions
|
@ -125,6 +125,10 @@
|
|||
(s/def ::delete-team
|
||||
(s/keys :req-un [::profile-id ::id]))
|
||||
|
||||
;; TODO: right now just don't allow delete default team, in future it
|
||||
;; should raise a speific exception for signal that this acction is
|
||||
;; not allowed.
|
||||
|
||||
(sv/defmethod ::delete-team
|
||||
[{:keys [pool] :as cfg} {:keys [id profile-id] :as params}]
|
||||
(db/with-atomic [conn pool]
|
||||
|
@ -135,7 +139,7 @@
|
|||
|
||||
(db/update! conn :team
|
||||
{:deleted-at (dt/now)}
|
||||
{:id id})
|
||||
{:id id :is-default false})
|
||||
nil)))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue