11 lines
361 B
TypeScript
11 lines
361 B
TypeScript
import { apiFetch, jsonResponse } from '../../_lib/api';
|
|
|
|
export const dynamic = 'force-dynamic';
|
|
|
|
export async function GET(): Promise<Response> {
|
|
const res = await apiFetch('/admin/bot').catch(() => null);
|
|
if (!res) return jsonResponse({ message: 'Upstream unavailable' }, 502);
|
|
const body = await res.json();
|
|
return jsonResponse(body, res.status);
|
|
}
|