assessment-model/src/app/api/plan/[id]/delete/preview/route.ts
2026-01-15 13:38:31 +00:00

13 lines
401 B
TypeScript

import { NextResponse } from "next/server";
import { previewPlanDeletion } from "@/lib/services/propertyDeletion";
export async function POST(
_req: Request,
context: { params: Promise<{ id: string }> }
) {
const { id } = await context.params; // 👈 THIS IS THE FIX
const planId = Number(id);
const preview = await previewPlanDeletion(planId);
return NextResponse.json({ preview });
}