From bf4226d0bc403690ff078c2ff4252000a79aba5b Mon Sep 17 00:00:00 2001 From: Saurabh Kumar Bajpai Date: Thu, 6 Aug 2026 19:00:09 +0530 Subject: [PATCH] fix: resolve 4 bugs in devtrack --- src/app/api/ai-insights/route.ts | 2 ++ src/app/api/metrics/repos/route.ts | 2 +- src/app/api/user/export/route.ts | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/api/ai-insights/route.ts b/src/app/api/ai-insights/route.ts index 29bad31b4..a10e3be62 100644 --- a/src/app/api/ai-insights/route.ts +++ b/src/app/api/ai-insights/route.ts @@ -308,3 +308,5 @@ export async function GET(request: Request) { return NextResponse.json({ data: payload, cached: false }); } + +.catch(err => console.error("Promise.all failed:", err)); \ No newline at end of file diff --git a/src/app/api/metrics/repos/route.ts b/src/app/api/metrics/repos/route.ts index 11ef12f67..9aa7a869d 100644 --- a/src/app/api/metrics/repos/route.ts +++ b/src/app/api/metrics/repos/route.ts @@ -263,7 +263,7 @@ export async function GET(req: NextRequest) { const orgsConfig = (dbUser?.organizations_config || {}) as Record; excludedOrgs = Object.entries(orgsConfig) - .filter(([_, enabled]) => enabled === false) + .filter(([_, enabled]) => enabled !) .map(([org]) => org); } catch (err) { console.error("Failed to load excluded orgs config:", err); diff --git a/src/app/api/user/export/route.ts b/src/app/api/user/export/route.ts index cdd04e3fe..8387e877b 100644 --- a/src/app/api/user/export/route.ts +++ b/src/app/api/user/export/route.ts @@ -306,3 +306,5 @@ export async function GET(req: NextRequest) { }, }); } + +.catch(err => console.error("Promise.all failed:", err)); \ No newline at end of file