18 lines
541 B
TypeScript
18 lines
541 B
TypeScript
|
|
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 }
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|