feat: throttle admin/payment/email endpoints and document user preferences API - #1337
Merged
RUKAYAT-CODER merged 1 commit intoAug 26, 2026
Merged
Conversation
…ences API - incident-management: apply CustomThrottleGuard with MODERATE limits to all state-changing endpoints (create/update/resolve/escalate, remediation actions, runbook executions); wire ThrottlerModule - email-unsubscribe: throttle unsubscribe (AUTH_DEFAULT) and resubscribe/preferences/status (MODERATE); wire ThrottlerModule - payment-methods: throttle all endpoints (MODERATE, matching the documented payment preset); wire ThrottlerModule - user-preferences: complete OpenAPI annotations with per-endpoint @ApiOperation/@apiresponse (200/400/401/404) and a typed UserPreferenceResponseDto so Swagger schemas render correctly Closes rinafcode#1331 Closes rinafcode#1328 Closes rinafcode#1326 Closes rinafcode#1321
|
@zakariyaufarida5-wq Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
Thank you for contributing to the project. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four changes:
CustomThrottleGuardapplied to all state-changing endpoints (create/update/resolve/escalate, remediation actions, runbook executions) with the documentedMODERATEpreset (10/hour);ThrottlerModulewired into the module. Exceeding a limit returns 429.AUTH_DEFAULT(5/hour) on one-click unsubscribe,MODERATEon resubscribe/preferences/status;ThrottlerModulewired in.MODERATE, matching the documented preset for payment paths;ThrottlerModulewired in.@ApiOperation+@ApiResponse(200/400/401/404) and references a typedUserPreferenceResponseDtoso Swagger renders schemas correctly; the controller stays grouped under@ApiTags(‘user-preferences’).Validation
pnpm run lint:ci(0 errors; remaining warnings are pre-existing),pnpm run typecheck, andpnpm run buildpass.THROTTLEpresets (documented, not hardcoded magic numbers); a rate-limited request returns HTTP 429 viaRateLimitExceededException.Closes #1331
Closes #1328
Closes #1326
Closes #1321