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

Multiple custom routes #220

Open
St4NNi opened this issue Nov 18, 2024 · 2 comments
Open

Multiple custom routes #220

St4NNi opened this issue Nov 18, 2024 · 2 comments
Labels
feature New feature or request

Comments

@St4NNi
Copy link
Contributor

St4NNi commented Nov 18, 2024

#209 has added the ability to add a custom route. Would it be possible to extend this to add more than one route? If so, I could give it a try!

Ok, looking at it more closely. We could have a generic /admin and handle all the subpaths ourselves.

BR

@Nugine
Copy link
Owner

Nugine commented Nov 18, 2024

You can use a router like matchit inside the custom route, which is the recommanded method.
I'm also open to accept a PR that adds multiple custom routes if you like this way.

BTW, the Req/Resp types of custom route seem strange due to historical reasons.
A (huge) breaking change is scheduled for these types (#210). It is not happening soon.

@Nugine Nugine added the feature New feature or request label Nov 18, 2024
@St4NNi
Copy link
Contributor Author

St4NNi commented Nov 18, 2024

Thanks for the answer, I will try the matchit idea and if I miss something I will come back to the multiple routes option.

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

No branches or pull requests

2 participants