clean up api

This commit is contained in:
Travis Shears 2025-06-05 11:04:46 +02:00
parent d69f14f906
commit b204fbb16d

View file

@ -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)))