Files
2026-06-09 02:02:40 +05:30

15 lines
592 B
TypeScript

import { apiFetch } from '../../../../../_lib/api';
export const dynamic = 'force-dynamic';
export async function DELETE(
_req: Request,
{ params }: { params: Promise<{ id: string; targetTenantId: string }> },
): Promise<Response> {
const { id, targetTenantId } = await params;
const res = await apiFetch(`/admin/groups/${id}/share/${targetTenantId}`, { method: 'DELETE' });
if (res.status === 204) return new Response(null, { status: 204 });
const body = await res.text();
return new Response(body, { status: res.status, headers: { 'Content-Type': 'application/json' } });
}