Skip to content
Merged
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
8 changes: 7 additions & 1 deletion apps/backend/src/app/api/deployments/[id]/health/route.ts
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
Loading