mirror of
https://github.com/penpot/penpot.git
synced 2025-05-21 19:06:11 +02:00
🐛 Fix team doesn't disappear after deletion (#5832)
This commit is contained in:
parent
8fe1271690
commit
6b26adb187
5 changed files with 91 additions and 1 deletions
|
@ -474,6 +474,13 @@
|
|||
(rx/tap on-success)
|
||||
(rx/catch on-error))))))
|
||||
|
||||
(defn- team-deleted
|
||||
[id]
|
||||
(ptk/reify ::team-deleted
|
||||
ptk/UpdateEvent
|
||||
(update [_ state]
|
||||
(update state :teams dissoc id))))
|
||||
|
||||
(defn delete-team
|
||||
[{:keys [id] :as params}]
|
||||
(ptk/reify ::delete-team
|
||||
|
@ -485,7 +492,10 @@
|
|||
(meta params)]
|
||||
|
||||
(->> (rp/cmd! :delete-team {:id id})
|
||||
(rx/mapcat on-success)
|
||||
(rx/mapcat (fn [result]
|
||||
(rx/concat
|
||||
(rx/of (team-deleted id))
|
||||
(on-success result))))
|
||||
(rx/catch on-error))))))
|
||||
|
||||
(defn delete-webhook
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue