some renaming

integration-tests
Josha von Gizycki 6 years ago
parent 691e1fa6d2
commit 7b4f3aeba5

@ -36,8 +36,8 @@
(hform/submit-button "Kama") (hform/submit-button "Kama")
(anti-forgery-field))])) (anti-forgery-field))]))
(defroutes auth-routes (defroutes routes
(GET "/login" [] login) (GET "/login" [] login)
(POST "/login-check" [] login-check!) (POST "/login-check" [] login-check!)
(GET "/logout" [] (fn [_] (-> (redirect "/login") (GET "/logout" [] (-> (redirect "/login")
(assoc :session nil))))) (assoc :session nil))))

@ -6,9 +6,9 @@
:refer [wrap-defaults site-defaults]] :refer [wrap-defaults site-defaults]]
[ring.util.response :as rur] [ring.util.response :as rur]
[ring.middleware.session.cookie :as session-cookie] [ring.middleware.session.cookie :as session-cookie]
[wanijo.home.routes :refer [home-routes]] [wanijo.home.routes :as home-routes]
[wanijo.schema.routes :refer [schema-routes]] [wanijo.schema.routes :as schema-routes]
[wanijo.framework.auth :refer [auth-routes]] [wanijo.framework.auth :as auth]
[wanijo.framework.devmode :as devmode])) [wanijo.framework.devmode :as devmode]))
(defn- wrap-login-redirect [handler] (defn- wrap-login-redirect [handler]
@ -18,10 +18,10 @@
(rur/redirect "/login")))) (rur/redirect "/login"))))
(defroutes app-routes (defroutes app-routes
(routes auth-routes) (routes auth/routes)
(wrap-login-redirect (wrap-login-redirect
(routes home-routes (routes home-routes/routes
schema-routes)) schema-routes/routes))
(route/not-found "Not Found")) (route/not-found "Not Found"))
(def app (def app

@ -2,5 +2,5 @@
(:require [compojure.core :refer [defroutes GET]] (:require [compojure.core :refer [defroutes GET]]
[wanijo.home.view :as home-view])) [wanijo.home.view :as home-view]))
(defroutes home-routes (defroutes routes
(GET "/" [] home-view/root!)) (GET "/" [] home-view/root!))

@ -21,7 +21,7 @@
(domain/find-by-uuid! uuid) (domain/find-by-uuid! uuid)
session)) session))
(defroutes schema-routes (defroutes routes
(GET "/schema" [] view-schema/overview!) (GET "/schema" [] view-schema/overview!)
(GET "/schema/:uuid" [uuid :as req] (show-schema! uuid (:session req))) (GET "/schema/:uuid" [uuid :as req] (show-schema! uuid (:session req)))
(POST "/schema/new" [] new!)) (POST "/schema/new" [] new!))

Loading…
Cancel
Save