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

withNamespace should support Higer Order nesting. #39

Open
ppot opened this issue Mar 7, 2018 · 0 comments
Open

withNamespace should support Higer Order nesting. #39

ppot opened this issue Mar 7, 2018 · 0 comments

Comments

@ppot
Copy link

ppot commented Mar 7, 2018

let say:

const api = withNamespace('/v1')
const affiliate = withNamespace('/affiliate')

  api(
     affiliate(
         post('/affiliation', affiliation)
         get('/dashboard', dashboard)
     )
  )

instead of

const api = withNamespace('/v1')

  api(
     post('/affiliate/affiliation', affiliation)
     get('/affiliate/dashboard', dashboard)
  )

As of now with withNamespace it's closely the same as :

  router(
     post('/v1/affiliate/affiliation', affiliation)
     get('/v1/affiliate/dashboard', dashboard)
  )

The other way around would be the possibility of nesting router by their namespaces.

@pedronauck

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