Hi all,
reitit.http/router throws error with var handlers. is there a workaround?
also, whats the difference between http/router and ring/router? they both seem to work the same way (I thought ring doesn't support interceptors)
there's also reitit.core/router . is it the same as http/router?
copying the default implementation of IFn's IntoInterceptor protocol worked for me:
(extend-protocol reitit.interceptor/IntoInterceptor
clojure.lang.Var
(into-interceptor [this data opts]
(reitit.interceptor/into-interceptor
{:name ::handler
::handler @this
:enter (fn [ctx]
(assoc ctx :response (@this (:request ctx))))}
data opts)))