clean up api
This commit is contained in:
parent
d69f14f906
commit
b204fbb16d
1 changed files with 3 additions and 4 deletions
|
|
@ -1,14 +1,13 @@
|
|||
(ns snippets.api
|
||||
(:require
|
||||
[ring.adapter.jetty :as jetty]
|
||||
[clojure.pprint :as pprint]
|
||||
[reitit.ring :as rr]))
|
||||
|
||||
(defn handler [_]
|
||||
(defn handler [args]
|
||||
(pprint/pprint args)
|
||||
{:status 200, :body "ok"})
|
||||
|
||||
(defn handle-not-found [_]
|
||||
{:status 404, :body "not found yo"})
|
||||
|
||||
(defn wrap [handler id]
|
||||
(fn [request]
|
||||
(update (handler request) :wrap (fnil conj '()) id)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue