Skip to content

feat: throttle admin/payment/email endpoints and document user preferences API - #1337

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
zakariyaufarida5-wq:fix/assigned-issues
Aug 26, 2026
Merged

feat: throttle admin/payment/email endpoints and document user preferences API#1337
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
zakariyaufarida5-wq:fix/assigned-issues

Conversation

@zakariyaufarida5-wq

Copy link
Copy Markdown

Summary

Four changes:

  1. Rate limit incident-managementCustomThrottleGuard applied to all state-changing endpoints (create/update/resolve/escalate, remediation actions, runbook executions) with the documented MODERATE preset (10/hour); ThrottlerModule wired into the module. Exceeding a limit returns 429.
  2. Rate limit email-unsubscribe — same guard: AUTH_DEFAULT (5/hour) on one-click unsubscribe, MODERATE on resubscribe/preferences/status; ThrottlerModule wired in.
  3. Rate limit payment-methods — all endpoints throttled with MODERATE, matching the documented preset for payment paths; ThrottlerModule wired in.
  4. OpenAPI docs for user-preferences — every endpoint now has @ApiOperation + @ApiResponse (200/400/401/404) and references a typed UserPreferenceResponseDto so 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, and pnpm run build pass.
  • Limits use the shared THROTTLE presets (documented, not hardcoded magic numbers); a rate-limited request returns HTTP 429 via RateLimitExceededException.

Closes #1331
Closes #1328
Closes #1326
Closes #1321

…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
@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project.

@RUKAYAT-CODER
RUKAYAT-CODER merged commit dee4c96 into rinafcode:main Aug 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants