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

Are there any examples with more complicated routing? #37

Closed
zoubarevm opened this issue Jan 21, 2017 · 1 comment
Closed

Are there any examples with more complicated routing? #37

zoubarevm opened this issue Jan 21, 2017 · 1 comment

Comments

@zoubarevm
Copy link

Hey,

Great work on this library!

I had a quick question regarding the routing engine. It seems like if I have potentially overlapping routes (like /me and /:id) both controller methods would get hit. Is there any way to restrict the response from trickling down to the second method? Currently, it seems like it's throwing an exception on:

...
response.setHeader("X-Managed-By", "Express-router-decorator");
...
Error: Can't set headers after they are sent.

I set breakpoints on both methods, and found that both methods get hit.

Also, I'm not sure if there's a way to order the resolution of the routes. Maybe using the order found within the controller class?

Cheers,

@zoubarevm
Copy link
Author

Duplicate of #29

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