Files
supervisor-ui/app/api/supervisor/config/route.ts

18 lines
541 B
TypeScript
Raw Normal View History

import { NextResponse } from 'next/server';
import { createSupervisorClient } from '@/lib/supervisor/client';
// GET - Get all process configurations
export async function GET() {
try {
const client = createSupervisorClient();
const configs = await client.getAllConfigInfo();
return NextResponse.json(configs);
} catch (error: any) {
console.error('Supervisor get config error:', error);
return NextResponse.json(
{ error: error.message || 'Failed to fetch configuration' },
{ status: 500 }
);
}
}