Summary of What Needs to be Done:
The repos route at src/app/api/metrics/repos/route.ts uses Number(req.nextUrl.searchParams.get(days)) || 30 which converts -5 to -5 instead of defaulting to 30. This allows negative or excessively large day values.
Changes that Need to be Made:
- File: src/app/api/metrics/repos/route.ts (line 118)
- Constrain days to valid range [1, 365] similar to contributions route
Impact that it would Provide:
- Prevents invalid date range calculations
- Ensures consistent API behavior
Summary of What Needs to be Done:
The repos route at src/app/api/metrics/repos/route.ts uses Number(req.nextUrl.searchParams.get(days)) || 30 which converts -5 to -5 instead of defaulting to 30. This allows negative or excessively large day values.
Changes that Need to be Made:
Impact that it would Provide: