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

Check Page and Count parameters #17

Open
kennyctran opened this issue May 15, 2021 · 2 comments
Open

Check Page and Count parameters #17

kennyctran opened this issue May 15, 2021 · 2 comments

Comments

@kennyctran
Copy link
Collaborator

When clients send Page and Count parameters, add the ability to check if the parameters sent are valid. If not, throw an error.

@trentgoing
Copy link

Could you think of a design pattern to validate all incoming parameters? Maybe some middleware that validates by type and could be added to each route applicable.

@kennyctran
Copy link
Collaborator Author

@trentgoing That would definitely clean up my controllers. I'll look into abstracting current code into middleware as well as adding future parameter checks as middleware.

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

2 participants