muller-reporting-sys/app/api/reports/[id]/route.ts
2025-11-12 22:21:35 +03:00

15 lines
375 B
TypeScript

import { prisma } from "@/lib/prisma"
import { NextResponse } from "next/server"
export async function PATCH(req: Request, { params }: { params: Promise<{ id: string }> }) {
const { id } = await params
const body = await req.json()
const report = await prisma.machineShiftReport.update({
where: { id },
data: body
})
return NextResponse.json(report)
}