Skip to content

Commit

Permalink
Fix routes-interceptor to wrap route/match fn
Browse files Browse the repository at this point in the history
Co-authored-by: Iain Wood <iain.wood@flexiana.com>
  • Loading branch information
gmsvalente and Iain Wood committed Dec 18, 2023
1 parent c2d9587 commit d5dccfa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/xiana/handler.clj
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@
([http-request]
(let [websocket? (jetty/ws-upgrade-request? http-request)
state (state/make deps http-request)
queue (list #(interceptor.queue/execute % (:router-interceptors deps))
enter-routes (map #(select-keys % [:enter :name]) (:router-interceptors deps))
leave-routes (map #(select-keys % [:leave :name]) (:router-interceptors deps))
queue (list #(interceptor.queue/execute % enter-routes)
#(route/match %)
#(interceptor.queue/execute % leave-routes)
#(interceptor.queue/execute % (if websocket?
(:web-socket-interceptors deps)
(:controller-interceptors deps))))
Expand Down

0 comments on commit d5dccfa

Please sign in to comment.