mirror of
https://github.com/penpot/penpot.git
synced 2025-02-03 04:49:03 -05:00
Improve error handlign on password change event.
This commit is contained in:
parent
1282fd9641
commit
563d3e6dd3
1 changed files with 7 additions and 2 deletions
|
@ -63,6 +63,10 @@
|
|||
(-apply-effect [_ state]
|
||||
(udm/info! (tr "profile.password-saved"))))
|
||||
|
||||
(defn password-updated
|
||||
[]
|
||||
(PasswordUpdated.))
|
||||
|
||||
;; --- Update Password
|
||||
|
||||
(defrecord UpdatePassword [data]
|
||||
|
@ -75,8 +79,9 @@
|
|||
(let [params {:old-password (:old-password data)
|
||||
:password (:password-1 data)}]
|
||||
(->> (rp/req :update/password params)
|
||||
(rx/catch rp/client-error? on-error)
|
||||
(rx/map #(->PasswordUpdated)))))))
|
||||
(rx/map password-updated)
|
||||
(rx/catch rp/client-error? on-error))))))
|
||||
|
||||
|
||||
(def ^:private update-password-schema
|
||||
[[:password-1 sc/required sc/string [sc/min-len 6]]
|
||||
|
|
Loading…
Add table
Reference in a new issue