🐛 Show correct error when google auth is disabled on backend.

This commit is contained in:
Andrey Antukh 2021-02-09 17:46:04 +01:00 committed by Andrés Moya
parent fc49674997
commit 36285a65d2
2 changed files with 9 additions and 1 deletions

View file

@ -37,7 +37,9 @@
(dom/prevent-default event)
(->> (rp/mutation! :login-with-google {})
(rx/subs (fn [{:keys [redirect-uri] :as rsp}]
(.replace js/location redirect-uri)))))
(.replace js/location redirect-uri))
(fn [{:keys [type] :as error}]
(st/emit! (dm/error (tr "errors.google-auth-not-enabled")))))))
(defn- login-with-gitlab
[event]