mirror of
https://github.com/penpot/penpot.git
synced 2025-06-03 01:41:39 +02:00
✨ Add minor improvements on how logout is handled
The profile-id is now required on the body of logout request
This commit is contained in:
parent
3d7f399a50
commit
6896a4e9f0
2 changed files with 21 additions and 8 deletions
|
@ -328,11 +328,15 @@
|
|||
(-data [_] {})
|
||||
|
||||
ptk/WatchEvent
|
||||
(watch [_ _ _]
|
||||
(->> (rp/cmd! :logout)
|
||||
(rx/delay-at-least 300)
|
||||
(rx/catch (constantly (rx/of 1)))
|
||||
(rx/map #(logged-out params)))))))
|
||||
(watch [_ state _]
|
||||
(let [profile-id (:profile-id state)]
|
||||
(->> (rx/interval 500)
|
||||
(rx/take 1)
|
||||
(rx/mapcat (fn [_]
|
||||
(->> (rp/cmd! :logout {:profile-id profile-id})
|
||||
(rx/delay-at-least 300)
|
||||
(rx/catch (constantly (rx/of 1))))))
|
||||
(rx/map #(logged-out params))))))))
|
||||
|
||||
;; --- Update Profile
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue