|
|
|
@ -17,8 +17,8 @@
|
|
|
|
|
(-> (redirect (path :home))
|
|
|
|
|
(assoc-in [:session :ident] uname)
|
|
|
|
|
(assoc-in [:session :uuid] (:uuid unode)))
|
|
|
|
|
(-> (redirect (path :auth-login))
|
|
|
|
|
(assoc :flash :invalid-credentials)))))
|
|
|
|
|
(assoc (redirect (path :auth-login))
|
|
|
|
|
:flash :invalid-credentials))))
|
|
|
|
|
|
|
|
|
|
(defn login! [req]
|
|
|
|
|
(view/layout!
|
|
|
|
@ -40,5 +40,5 @@
|
|
|
|
|
(defroutes routes
|
|
|
|
|
(GET (register! :auth-login "/login") [] login!)
|
|
|
|
|
(POST (register! :auth-login-check "/login-check") [] login-check!)
|
|
|
|
|
(GET (register! :auth-logout "/logout") [] (-> (redirect "/login")
|
|
|
|
|
(assoc :session nil))))
|
|
|
|
|
(GET (register! :auth-logout "/logout") [] (assoc (redirect "/login")
|
|
|
|
|
:session nil)))
|
|
|
|
|