good forst commit

This commit is contained in:
2026-06-09 02:02:40 +05:30
parent 801c1d7121
commit 249d759e6a
215 changed files with 15425 additions and 1240 deletions
+15
View File
@@ -0,0 +1,15 @@
import { apiFetch, jsonResponse } from '../../../_lib/api';
export const dynamic = 'force-dynamic';
export async function POST(req: Request): Promise<Response> {
const body = await req.json();
const res = await apiFetch('/admin/bot/attach', {
method: 'POST',
headers: { 'Content-Type': 'application/json', Accept: 'application/json' },
body: JSON.stringify(body),
}).catch(() => null);
if (!res) return jsonResponse({ message: 'Upstream unavailable' }, 502);
const payload = await res.json();
return jsonResponse(payload, res.status);
}