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

dodo-core-features: Add query parameter describe / parse feature to router #2

Open
elhigu opened this issue Nov 18, 2015 · 1 comment

Comments

@elhigu
Copy link

elhigu commented Nov 18, 2015

Something like:

router.get('/')
  .query('paramName', { type: number, optional: true, doc: 'Number of things' })
  .query('paramName2', { type: number, optional: false, doc: 'Number of things' })
  .handler(function (req, res) {
    typeof req.query.paramName === 'number'; // this would be true
  });

type could be also function taking string as parameter and returning promise or value.

@elhigu elhigu changed the title Add query parameter describe / parse feature to dodo-core-features router dodo-core-features: Add query parameter describe / parse feature to router Jun 30, 2016
@elhigu
Copy link
Author

elhigu commented Oct 5, 2016

  • something which would be like UI router resolve thing to be able to separate fetching data and part where you use the data e.g. in access control check code...

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