Repository navigation
fix(backend): mount auditLogsRouter in app.ts, add rate limit bucket,… - #693
Closed
kosisochukwu1234 wants to merge 1 commit into
Closed
kosisochukwu1234 wants to merge 1 commit into
kosisochukwu1234 wants to merge 1 commit into
Conversation
… and validate query schema
|
👋 Hi @kosisochukwu1234, thanks for your contribution! Pull requests from contributors must target the This PR is being closed automatically. Please open a new PR (or retarget this one by reopening it after editing the base branch) against |
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.
Description
Resolves an issue where
GET /audit-logswas unreachable (returning 404 on the running Express server) becauseauditLogsRouterwas defined inapps/backend/src/routes/auditLogs.tsbut never mounted inapps/backend/src/app.ts.Summary of Changes:
app.use('/audit-logs', auditLogsRouter)inapps/backend/src/app.tsafter the global rate limiter and security router.audit_logsbucket (30 / min) toapps/backend/src/config/rateLimits.tsand attachedrateLimit('audit_logs')toauditLogsRouter.action,limit, andcursorquery parameters withAuditLogsQuerySchema(using Zod) while preserving existing 400 response formats for unknown action filters.docs/security/rate-limits.mdand added a test inapps/backend/src/__tests__/auditLog.test.tsrequesting/audit-logsthroughappto verify reachability.Closes #648