17 lines
385 B
TypeScript
17 lines
385 B
TypeScript
import { PrismaClient } from "@/generated/prisma";
|
|
|
|
export async function GET(
|
|
request: Request,
|
|
{ params }: { params: Promise<{ id: string }> },
|
|
) {
|
|
const prisma = new PrismaClient();
|
|
const { id }: { id: string } = await params;
|
|
|
|
const cliente = await prisma.intervento.findMany({
|
|
where: {
|
|
id_registratore: id,
|
|
},
|
|
});
|
|
|
|
return Response.json({ cliente });
|
|
}
|