-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
fix: added onExceeding and onExceeded to be available #247
fix: added onExceeding and onExceeded to be available #247
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.
Could you document those in the README?
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.
lgtm
probably TS types need to be updated too? |
@@ -104,6 +104,8 @@ export interface RateLimitOptions { | |||
context: errorResponseBuilderContext | |||
) => object; | |||
enableDraftSpec?: boolean; | |||
onExceeding?: (req: FastifyRequest) => void; | |||
onExceeded?: (req: FastifyRequest) => void; |
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.
Could you add a test for the new types? we use tsd
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.
lgtm
onExceeding and onExceeded to be available
issue #232
Checklist
npm run test
andnpm run benchmark
and the Code of conduct