-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
I'd also provide more context and rationale when opening the PR to the real Compojre project. Input is welcome! |
e8ff6e0
to
9e1744a
Compare
This provides access to the full route that contains the common prefix. The full-route info is added to the ':compojure/full-route' key in the request map. Co-authored-by: Liam Chen <[email protected]> Co-authored-by: Claire Alvis <[email protected]>
9e1744a
to
014fedc
Compare
We use |
src/compojure/core.clj
Outdated
(clout/route-compile (str route# ":__path-info") ~re-context) | ||
(if (string? route#) | ||
{:context-route route#} | ||
{})))))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the PR, you should mention that the with-meta
is our attempt to not change the type of make-context
, as it is public (albeit not documented). we could make a more direct map-based implementation if backwards compatibility of make-context
is not important
also not entirely sure what the full syntax is of context
, so it's possible we're missing a case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After talking through these changes, the pr looks good to me
This approach is simpler, pass the path down, rather than attaching it to the meta.
weavejester#212 has been merged! |
This provides access to the full route that contains the common prefix.
The full-route info is added to the ':compojure/full-route' key in the
request map.