2025-11-23 18:23:51 +01:00
|
|
|
import { NextRequest, NextResponse } from 'next/server';
|
|
|
|
|
import { createSupervisorClient } from '@/lib/supervisor/client';
|
2025-11-23 20:53:23 +01:00
|
|
|
import { withLogging } from '@/lib/utils/api-logger';
|
2025-11-23 18:23:51 +01:00
|
|
|
|
|
|
|
|
export const dynamic = 'force-dynamic';
|
|
|
|
|
|
|
|
|
|
interface RouteParams {
|
|
|
|
|
params: Promise<{ name: string }>;
|
|
|
|
|
}
|
|
|
|
|
|
2025-11-23 20:53:23 +01:00
|
|
|
export const GET = withLogging(async (request: NextRequest, { params }: RouteParams) => {
|
|
|
|
|
const { name } = await params;
|
|
|
|
|
|
|
|
|
|
const client = createSupervisorClient();
|
|
|
|
|
const processInfo = await client.getProcessInfo(name);
|
|
|
|
|
|
|
|
|
|
return NextResponse.json(processInfo);
|
|
|
|
|
}, 'getProcessInfo');
|