more migration to new routing function

integration-tests
Josha von Gizycki 6 years ago
parent 37c42d94ac
commit 2ccb94a944

@ -2,7 +2,7 @@
(:require [compojure.core :refer [defroutes GET POST]]
[ring.util.response :as resp]
[wanijo.framework.form :as form]
[wanijo.framework.routing :refer [register path]]
[wanijo.framework.routing :refer [register! path]]
[wanijo.attribute.domain :as domain]
[wanijo.schema.view :as view-schema]
[wanijo.schema.domain :as domain-schema]))
@ -23,7 +23,7 @@
(domain/find-by-schema! schema-uuid)
req))))
(register :attribute-new "/attribute/new")
(defroutes routes
(POST "/attribute/new" [] new!))
(POST (register! :attribute-new "/attribute/new")
[]
new!))

@ -1,16 +1,17 @@
(ns wanijo.user.routes
(:require [compojure.core :refer [defroutes GET POST]]
[ring.util.response :as resp]
[wanijo.framework.routing :refer [register]]
[wanijo.framework.routing :refer [register!]]
[wanijo.user.view :as view-user]
[wanijo.user.domain :as domain]))
(register :user-profile "/user/profile")
(register :user-edit "/user/edit")
(defn profile! [req]
(view-user/profile! req
(domain/find! (get-in req [:session :ident]))))
(defroutes routes
(GET "/user/profile" [] profile!))
(GET
(register! :user-profile "/user/profile")
[:as req]
(view-user/profile!
req
(domain/find! (get-in req [:session :ident]))))
(POST (register! :user-edit "/user/edit")
[]
(fn [req])))

Loading…
Cancel
Save