Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/api/local-coding/sync/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
}

const { searchParams } = new URL(req.url);
const rawDays = parseInt(searchParams.get("days") || "30", 10);
const rawDays = parseInt(searchParams.get("days", 10) || "30", 10);

Check failure on line 281 in src/app/api/local-coding/sync/route.ts

View workflow job for this annotation

GitHub Actions / Type check

Expected 1 arguments, but got 2.
const days = validateDays(isNaN(rawDays) ? DEFAULT_DAYS : rawDays);
const fromDate = new Date();
fromDate.setDate(fromDate.getDate() - days);
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/metrics/repos/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export async function GET(req: NextRequest) {
const daysParam = req.nextUrl.searchParams.get("days");
const parsedDays = daysParam ? parseInt(daysParam, 10) : NaN;
// Clamp days between 1 and 365 — GitHub Commit Search supports up to ~1 year lookback.
const days = isNaN(parsedDays) ? 30 : Math.max(1, Math.min(365, parsedDays));
const days = Number.isNaN(parsedDays) ? 30 : Math.max(1, Math.min(365, parsedDays));
const accountId = req.nextUrl.searchParams.get("accountId");
const bypass = isMetricsCacheBypassed(req);

Expand Down
Loading