Module for initializing routes created by sweet-tooth.endpoint.routes.reitit and associng in the reitit router as the app's :duct/router
This ns contains DEEP FORBIDDEN MAGIC and is maybe a TERRIBLE IDEA
Module for initializing routes created by sweet-tooth.endpoint.routes.reitit and associng in the reitit router as the app's :duct/router This ns contains DEEP FORBIDDEN MAGIC and is maybe a TERRIBLE IDEA - Module adds a ::router config key, taking route data as an arg - route data is sprinkled with helpful sweet-tooth goodies - route data includes refs to handler keys - handler keys are added to the config - handler keys are derived from ::unary-handler and ::coll-handler to provide MAGICAL defaults
(add-ent-type [_ endpoint-opts :as route])
(add-handler-ref ns-route)
Adds an integrant ref to an ns-route for :handler
so that the
handler can be initialized by the backend
Adds an integrant ref to an ns-route for `:handler` so that the handler can be initialized by the backend
(add-id-keys ns-route)
(add-middleware ns-route)
Middleware is added to reitit in order to work on the request map that reitit produces before that request map is passed to the handler
Middleware is added to reitit in order to work on the request map that reitit produces before that request map is passed to the handler
(add-ns-route-config ns-route-config [_ ns-route-opts])
(endpoint-handler-key endpoint-opts)
(format-middleware-fn [_ endpoint-opts])
(liberator-resources endpoint-opts)
Return both entry and collection request handlers
Return both entry and collection request handlers
(magic-the-f-out-of-this-route-data route-data)
I'M SORRY
TODO come up with a better name
I'M SORRY TODO come up with a better name
(magic-the-handler route-data)
(ns-route? route)
differentiate 'normal' routes from those generated by ns-pair->ns-route
differentiate 'normal' routes from those generated by ns-pair->ns-route
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close