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

Reverse route sorting so dynamic routes don't override static routes #137

Merged
merged 8 commits into from
Apr 10, 2024

Conversation

bruceharrison1984
Copy link
Contributor

@bruceharrison1984 bruceharrison1984 commented Apr 9, 2024

This reverses the sort order of routes to prevent dynamic routes from squashing static routes.

Fixes #131

Due to the change in sort order, this simplified the way that we register middleware. This may also be able to be applied to the renderer as well, but for now the tests appear to be passing just fine.

@bruceharrison1984 bruceharrison1984 changed the title Sort routes so dynamic routes don't override static routes Reverse route sorting so dynamic routes don't override static routes Apr 9, 2024
Copy link
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@yusukebe
Copy link
Member

@bruceharrison1984

Awesome! I'll merge this now. Thank you, Bruce!

@yusukebe yusukebe merged commit 78c4d2a into honojs:main Apr 10, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

Routing priority
2 participants