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

Nested Routers? #27

Open
Mazyod opened this issue Jan 8, 2018 · 0 comments
Open

Nested Routers? #27

Mazyod opened this issue Jan 8, 2018 · 0 comments

Comments

@Mazyod
Copy link
Contributor

Mazyod commented Jan 8, 2018

Hi,

As Router implements WebApp protocol, I assumed I could nest routers as follows:

let userRouter = Router()
userRouter["/create"] = ...
userRouter["/list"] = ...

let rootRouter = Router()
router["/user"] = userRouter

That doesn't seem to work. Whenever I hit /user path, the WebApp assigned to /create always gets run, regardless of the subpath.

Is this a known limitation? Is there interest in getting contributors implementing this?

Thanks,
Maz

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