import { NextResponse } from 'next/server'; import { createSupervisorClient } from '@/lib/supervisor/client'; // POST - Reload configuration export async function POST() { try { const client = createSupervisorClient(); const result = await client.reloadConfig(); return NextResponse.json({ success: true, message: 'Configuration reloaded', result, }); } catch (error: any) { console.error('Supervisor reload config error:', error); return NextResponse.json( { error: error.message || 'Failed to reload configuration' }, { status: 500 } ); } }