-
Notifications
You must be signed in to change notification settings - Fork 184
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
protect post routes with middleware #139
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add a tests for the middleware?
Thanks for your work on this 👍 |
Only thing missing here seems to be a test, could you add that @Gummibeer ? |
Unit or feature? |
Depends what you understand under those terms. I would have a test that sets up a route with the middleware applied to it. The test would test just make calls to that route. |
Ok, so feature/implementation. Unittest, for me, would be calling the middleware handle method directly and expect any result. |
👍 |
unittests added in c5ded3e |
Thanks for your work on this. @mpociot if you agree with these changes too, we can merge them. |
Thank you for this! :) |
Like discussed with @freekmurze this adds a little protection to the two post routes. In extension of #93