You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
506 B
18 lines
506 B
(ns wanijo.user.routes
|
|
(:require [compojure.core :refer [defroutes GET POST]]
|
|
[ring.util.response :as resp]
|
|
[wanijo.infra.routing :refer [register!]]
|
|
[wanijo.user.view :as view-user]
|
|
[wanijo.user.db :as domain]))
|
|
|
|
(defroutes routes
|
|
(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])))
|