13 lines
267 B
TypeScript
13 lines
267 B
TypeScript
import { prisma } from "@/lib/prisma"
|
|
import { NextResponse } from "next/server"
|
|
|
|
export async function POST(req: Request) {
|
|
const body = await req.json()
|
|
|
|
const machine = await prisma.machine.create({
|
|
data: body
|
|
})
|
|
|
|
return NextResponse.json(machine)
|
|
}
|