Closed muthuishere closed 7 months ago
(defn api-routes [opts]
["" {:query-fn (:query-fn opts)} ; < this adds the :query-fn key to route-data
["/swagger.json"
{:get {:no-doc true
:swagger {:info {:title "<<ns-name>> API"}}
:handler (swagger/create-swagger-handler)}}]
["/health"
{:get health/healthcheck!}]])
use the "" {:query-fn (:query-fn opts)}
it can inject query-fn in opts
based on https://github.com/kit-clj/kit/issues/119