Merge branch 'master' of https://gitea.heevyis.ninja/josha/wanijo
commit
31b18dec40
@ -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…
Reference in new issue