Files
tower/apps/web/app/api/bot/[id]/route.ts
T
2026-06-09 02:02:40 +05:30

14 lines
426 B
TypeScript

import { apiFetch, jsonResponse } from '../../../_lib/api';
export const dynamic = 'force-dynamic';
export async function DELETE(
_req: Request,
{ params }: { params: Promise<{ id: string }> },
): Promise<Response> {
const { id } = await params;
const res = await apiFetch(`/admin/bot/${id}`, { method: 'DELETE' });
const payload = await res.json().catch(() => ({}));
return jsonResponse(payload, res.status);
}