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

fix: added onExceeding and onExceeded to be available #247

Merged
merged 3 commits into from
Jul 13, 2022
Merged

fix: added onExceeding and onExceeded to be available #247

merged 3 commits into from
Jul 13, 2022

Conversation

dancastillo
Copy link
Contributor

onExceeding and onExceeded to be available
issue #232

Checklist

Copy link
Member

@mcollina mcollina left a 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?

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kibertoad
Copy link
Member

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;
Copy link
Member

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

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit dc58e9e into fastify:master Jul 13, 2022
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

Successfully merging this pull request may close these issues.

None yet

3 participants