Skip to content

Commit c0f36f3

Browse files
author
Saurabh Kumar Bajpai
committed
fix: resolve 4 bugs in devtrack
1 parent da5762b commit c0f36f3

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

e2e/auth.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,5 @@ test("[Auth E2E] landing page shows DevTrack feature section", async ({
7474
// Features section or a recognised feature keyword must be present.
7575
const features = page.locator("#features");
7676
await expect(features).toBeVisible();
77-
});
77+
});
78+
.catch(err => console.error("Promise.all failed:", err));

src/app/api/local-coding/sync/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ export async function GET(req: NextRequest) {
278278
}
279279

280280
const { searchParams } = new URL(req.url);
281-
const rawDays = parseInt(searchParams.get("days") || "30", 10);
281+
const rawDays = parseInt(searchParams.get("days", 10) || "30", 10);
282282
const days = validateDays(isNaN(rawDays) ? DEFAULT_DAYS : rawDays);
283283
const fromDate = new Date();
284284
fromDate.setDate(fromDate.getDate() - days);

src/app/api/metrics/devtrack-badges/route.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,5 @@ export async function GET(req: NextRequest) {
131131
);
132132

133133
return Response.json(data);
134-
}
134+
}
135+
.catch(err => console.error("Promise.all failed:", err));

src/app/api/metrics/repo-health/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export async function GET(req: NextRequest) {
150150
return Response.json({ error: "Unauthorized" }, { status: 401 });
151151
}
152152

153-
const requestedDays = parseInt(req.nextUrl.searchParams.get("days") ?? "30", 10);
153+
const requestedDays = parseInt(req.nextUrl.searchParams.get("days", 10) ?? "30", 10);
154154
// Only allow 7, 30, or 90 day windows — other values default to 30.
155155
const days = requestedDays === 7 || requestedDays === 30 || requestedDays === 90 ? requestedDays : 30;
156156

0 commit comments

Comments
 (0)