19 lines
544 B
TypeScript
19 lines
544 B
TypeScript
|
|
import { NextResponse } from 'next/server';
|
||
|
|
import { createSupervisorClient } from '@/lib/supervisor/client';
|
||
|
|
|
||
|
|
export const dynamic = 'force-dynamic';
|
||
|
|
|
||
|
|
export async function GET() {
|
||
|
|
try {
|
||
|
|
const client = createSupervisorClient();
|
||
|
|
const systemInfo = await client.getSystemInfo();
|
||
|
|
return NextResponse.json(systemInfo);
|
||
|
|
} catch (error: any) {
|
||
|
|
console.error('Supervisor system info error:', error);
|
||
|
|
return NextResponse.json(
|
||
|
|
{ error: error.message || 'Failed to fetch system info' },
|
||
|
|
{ status: 500 }
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|