diff --git a/apps/backend/src/app/api/deployments/[id]/health/route.ts b/apps/backend/src/app/api/deployments/[id]/health/route.ts index 553c98b3..df8ae6a9 100644 --- a/apps/backend/src/app/api/deployments/[id]/health/route.ts +++ b/apps/backend/src/app/api/deployments/[id]/health/route.ts @@ -1,11 +1,17 @@ import { NextRequest, NextResponse } from 'next/server'; import { withDeploymentAuth } from '@/lib/api/with-auth'; import { healthMonitorService } from '@/services/health-monitor.service'; +import { VercelService } from '@/services/vercel.service'; + +const vercelService = new VercelService(); export const GET = withDeploymentAuth(async (_req: NextRequest, { params }) => { try { const health = await healthMonitorService.checkDeploymentHealth(params.id); - return NextResponse.json(health); + return NextResponse.json({ + ...health, + circuitState: vercelService.breaker.currentState, + }); } catch (error: any) { console.error('Error checking deployment health:', error); return NextResponse.json(