Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parameter matching should be extended #8

Open
carbon-hvze opened this issue Aug 13, 2018 · 0 comments
Open

parameter matching should be extended #8

carbon-hvze opened this issue Aug 13, 2018 · 0 comments

Comments

@carbon-hvze
Copy link

(defn user [])

(def routes
  {"user"
   {[:user/id] {:POST #'user}
    [:user-id] {:GET #'user}}})

(def routes-1
  {"user"
   {[:user/id] {:GET #'user
                :POST #'user}}})

In the first case

(rm/match [:get "user/123"] routes) => nil

it seems that route map does not try to match with next parameter mask (:user-id) after matching with first one (:user/id). the question is whether to allow this behaviour (different naming of the same url part) or restrict it. in either case something should be done to avoid implicit matching errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant