Improve auth module.

This commit is contained in:
Andrey Antukh 2021-02-11 13:36:46 +01:00
parent d5ff5ea91e
commit 5858f3f180
12 changed files with 269 additions and 254 deletions

View file

@ -122,18 +122,6 @@
(seq params))
(send-mutation! id form)))
(defmethod mutation :login
[id params]
(let [uri (str cfg/public-uri "/api/login")]
(->> (http/send! {:method :post :uri uri :body params})
(rx/mapcat handle-response))))
(defmethod mutation :logout
[id params]
(let [uri (str cfg/public-uri "/api/logout")]
(->> (http/send! {:method :post :uri uri :body params})
(rx/mapcat handle-response))))
(defmethod mutation :login-with-ldap
[id params]
(let [uri (str cfg/public-uri "/api/login-ldap")]

View file

@ -63,7 +63,6 @@
on-error
(fn [form event]
(js/console.log error?)
(reset! error? true))
on-submit
@ -107,8 +106,7 @@
:help-icon i/eye
:label (tr "auth.password")}]]
[:& fm/submit-button
{:label (tr "auth.login-submit")
:on-click on-submit}]
{:label (tr "auth.login-submit")}]
(when cfg/login-with-ldap
[:& fm/submit-button