ukayani / restify-router

A router interface for restify that lets you aggregate route definitions and apply to a restify server
MIT License
52 stars 15 forks source link

Fix a bug I found when there are more than one group (at same nesting level) under a non null prefix path #30

Closed jvverde closed 4 years ago

jvverde commented 4 years ago

Just add two variables and change two lines.

My Problem was:

router.group('/v1', (router) => { router.group('/auth', ...) router.group('/user', ...) })

routes under /user lost v1 prefix. I expected /v1/user/info and I got /user/info

Best regards

ukayani commented 4 years ago

Thanks for the fix @jvverde. Would you mind adding a test case for this issue?

ukayani commented 4 years ago

Curious why we couldn't just add this to our router.spec ? is it because the file is too large as it is?

jvverde commented 4 years ago

Thanks for the fix @jvverde. Would you mind adding a test case for this issue?

I am not used to pull request to others code, so it was my ignorance how to proceed. But I can do that.

ukayani commented 4 years ago

Thanks!