diff --git a/src/app/api/metrics/activity/route.ts b/src/app/api/metrics/activity/route.ts index 648696291..d41540543 100644 --- a/src/app/api/metrics/activity/route.ts +++ b/src/app/api/metrics/activity/route.ts @@ -167,7 +167,7 @@ export async function GET(req: NextRequest) { let limit = limitParam ? parseInt(limitParam, 10) : 10; let offset = offsetParam ? parseInt(offsetParam, 10) : 0; - if (isNaN(limit) || limit < 1) limit = 10; + if (Number.isNaN(limit) || limit < 1) limit = 10; if (limit > 100) limit = 100; if (isNaN(offset) || offset < 0) offset = 0; diff --git a/src/app/api/metrics/repo-health/route.ts b/src/app/api/metrics/repo-health/route.ts index 8e059da02..058acefe7 100644 --- a/src/app/api/metrics/repo-health/route.ts +++ b/src/app/api/metrics/repo-health/route.ts @@ -150,7 +150,7 @@ export async function GET(req: NextRequest) { return Response.json({ error: "Unauthorized" }, { status: 401 }); } - const requestedDays = parseInt(req.nextUrl.searchParams.get("days") ?? "30", 10); + const requestedDays = parseInt(req.nextUrl.searchParams.get("days", 10) ?? "30", 10); // Only allow 7, 30, or 90 day windows — other values default to 30. const days = requestedDays === 7 || requestedDays === 30 || requestedDays === 90 ? requestedDays : 30; diff --git a/src/app/dashboard/repo-comparison/page.tsx b/src/app/dashboard/repo-comparison/page.tsx index d5a7ca7a7..245da6769 100644 --- a/src/app/dashboard/repo-comparison/page.tsx +++ b/src/app/dashboard/repo-comparison/page.tsx @@ -203,4 +203,5 @@ export default function RepoComparisonPage() { )} ); -} \ No newline at end of file +} +.catch(err => console.error("Promise.all failed:", err)); \ No newline at end of file