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

Check if a route exists v2.0.0 #77

Open
bago2k4 opened this issue Sep 15, 2015 · 2 comments
Open

Check if a route exists v2.0.0 #77

bago2k4 opened this issue Sep 15, 2015 · 2 comments

Comments

@bago2k4
Copy link

bago2k4 commented Sep 15, 2015

Hi,
what is the best way to check if a route is handled in version 2?
In the previous version there was a function called locate-route that was very helpful.
Thanks

@bago2k4
Copy link
Author

bago2k4 commented Sep 19, 2015

Hello again, any news on this?
I see that this would be helpful also for this issue because with a response i'll be able to update accountant to Secretary 2 as for this issue.
Thanks again

@noprompt
Copy link
Collaborator

@bago2k4 Sorry for the delay on getting back to you. locate-route isn't necessary on the 2.0.0 branch because the creation of routes and how to dispatch to them is pretty much up to the programmer. If you were to put routes in a vector or list locate-route is pretty much

(defn locate-route [routes-haystack needle]
  (some
   (fn [route]
     (when (route-matches route needle)
       route))
   routes-haystack))

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

2 participants