mirror of
https://github.com/penpot/penpot.git
synced 2025-05-28 14:46:15 +02:00
✨ Improve auth module.
This commit is contained in:
parent
d5ff5ea91e
commit
5858f3f180
12 changed files with 269 additions and 254 deletions
|
@ -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")]
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue