fix(audit-logs): use project id for audit log retention update#5882
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Greptile SummaryThis PR fixes a bug where the Audit Logs Retention settings page was calling Changes:
The backend route ( Confidence Score: 5/5Safe to merge — targeted, correct fix for a 404 bug with no logic regressions. The change is minimal and precisely addresses the described bug. The backend route was verified to require a project ID (ProjectFilterType.ID), and the fix is applied uniformly across the DTO type, mutation hook, and component. No new logic, no security concerns, no breaking API changes. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "fix: use project id for audit log retent..." | Re-trigger Greptile |
|
Good find. Thank you for your contribution |
Fixes #5883
Context
This PR fixes a bug in Project Settings → Audit Logs Retention where the frontend sent the project slug in the retention update API path, while the backend endpoint expects a project ID.
Before:
PUT /api/v1/projects/<project-slug>/audit-logs-retention404 Project with ID '<slug>' not foundAfter:
PUT /api/v1/projects/<project-id>/audit-logs-retentionScreen recording
Screen.Recording.2026-03-31.at.11.23.33.PM.mov
Screen.Recording.2026-03-31.at.11.26.16.PM.mov
Steps to verify the change
Settings → General → Audit Logs Retention.PUT /api/v1/projects/<project-id>/audit-logs-retention200and success toast appears.Type
Checklist
type(scope): short description