|
|
@ -9,13 +9,14 @@
|
|
|
|
[wanijo.home.routes :as home-routes]
|
|
|
|
[wanijo.home.routes :as home-routes]
|
|
|
|
[wanijo.schema.routes :as schema-routes]
|
|
|
|
[wanijo.schema.routes :as schema-routes]
|
|
|
|
[wanijo.framework.auth :as auth]
|
|
|
|
[wanijo.framework.auth :as auth]
|
|
|
|
[wanijo.framework.devmode :as devmode]))
|
|
|
|
[wanijo.framework.devmode :as devmode]
|
|
|
|
|
|
|
|
[wanijo.framework.routing :refer [path]]))
|
|
|
|
|
|
|
|
|
|
|
|
(defn- wrap-login-redirect [handler]
|
|
|
|
(defn- wrap-login-redirect [handler]
|
|
|
|
(fn [req]
|
|
|
|
(fn [req]
|
|
|
|
(if (get-in req [:session :ident])
|
|
|
|
(if (get-in req [:session :ident])
|
|
|
|
(handler req)
|
|
|
|
(handler req)
|
|
|
|
(rur/redirect "/login"))))
|
|
|
|
(rur/redirect (path :auth-login)))))
|
|
|
|
|
|
|
|
|
|
|
|
(defroutes app-routes
|
|
|
|
(defroutes app-routes
|
|
|
|
(routes auth/routes)
|
|
|
|
(routes auth/routes)
|
|
|
|