We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi. I have this 2 route but I want the request record on them to be the same.
Route.post('raffles-like', 'RaffleLikeController.store').middleware([ 'customAuth', 'throttle:20,30' ]) Route.delete('raffles-like/:productId', 'RaffleLikeController.destroy').middleware([ 'customAuth', 'throttle:20,30' ])
What's currently happening is that when I like a product and reach the throttle limit, I would still be able to, unlike the product.
What I want to happen is that when Liking throttle limit is reached it should be the same with unlike.
Like this.
Route.post('raffles-like', 'RaffleLikeController.store').middleware([ 'customAuth', 'throttle-like:20,30' ]) Route.delete('raffles-like/:productId', 'RaffleLikeController.destroy').middleware([ 'customAuth', 'throttle-like:20,30' ])
How do I achieve this?
The text was updated successfully, but these errors were encountered:
Hi @jericopulvera,
I currently generate a signature for each route like so request method + path + user IP. https://github.com/masasron/adonis-throttle/blob/master/middleware/ThrottleRequests.js#L71
You can overwrite this value when by using the Throttle object directly. https://github.com/masasron/adonis-throttle#advance
Throttle
I would just create a new middleware that removes the request method from the signature.
Sorry, something went wrong.
No branches or pull requests
Hi. I have this 2 route but I want the request record on them to be the same.
What's currently happening is that when I like a product and reach the throttle limit, I would still be able to, unlike the product.
What I want to happen is that when Liking throttle limit is reached it should be the same with unlike.
Like this.
How do I achieve this?
The text was updated successfully, but these errors were encountered: