mirror of
https://github.com/penpot/penpot.git
synced 2025-03-18 10:41:29 -05:00
🐛 Fix unexpected internal error on password recovery request.
This commit is contained in:
parent
dfc938b804
commit
3b0ea9b7fd
2 changed files with 9 additions and 8 deletions
|
@ -187,7 +187,6 @@
|
|||
(db/exec-one! conn [sql:profile-by-email email])))
|
||||
|
||||
|
||||
|
||||
;; --- Mutation: Register if not exists
|
||||
|
||||
(sm/defmutation ::login-or-register
|
||||
|
@ -433,10 +432,11 @@
|
|||
:name (:fullname profile)}))]
|
||||
|
||||
(db/with-atomic [conn db/pool]
|
||||
(let [profile (->> (retrieve-profile-by-email conn email)
|
||||
(create-recovery-token conn))]
|
||||
(send-email-notification conn profile)
|
||||
nil))))
|
||||
(some->> email
|
||||
(retrieve-profile-by-email conn)
|
||||
(create-recovery-token conn)
|
||||
(send-email-notification conn))
|
||||
nil)))
|
||||
|
||||
|
||||
;; --- Mutation: Recover Profile
|
||||
|
|
|
@ -12,12 +12,12 @@
|
|||
[cljs.spec.alpha :as s]
|
||||
[cuerdas.core :as str]
|
||||
[rumext.alpha :as mf]
|
||||
[uxbox.main.ui.icons :as i]
|
||||
[uxbox.common.spec :as us]
|
||||
[uxbox.main.data.auth :as uda]
|
||||
[uxbox.main.data.messages :as dm]
|
||||
[uxbox.main.store :as st]
|
||||
[uxbox.main.ui.components.forms :refer [input submit-button form]]
|
||||
[uxbox.main.ui.icons :as i]
|
||||
[uxbox.main.ui.navigation :as nav]
|
||||
[uxbox.util.dom :as dom]
|
||||
[uxbox.util.forms :as fm]
|
||||
|
@ -29,8 +29,9 @@
|
|||
|
||||
(defn- on-submit
|
||||
[form event]
|
||||
(let [on-success #(st/emit! (dm/info (tr "auth.notifications.recovery-token-sent"))
|
||||
(rt/nav :auth-login))
|
||||
(let [on-success #(st/emit!
|
||||
(dm/info (tr "auth.notifications.recovery-token-sent"))
|
||||
(rt/nav :auth-login))
|
||||
params (with-meta (:clean-data form)
|
||||
{:on-success on-success})]
|
||||
(st/emit! (uda/request-profile-recovery params))))
|
||||
|
|
Loading…
Add table
Reference in a new issue