10 lines
239 B
TypeScript
10 lines
239 B
TypeScript
import { prisma } from "@/lib/prisma"
|
|
import { NextResponse } from "next/server"
|
|
|
|
export async function GET() {
|
|
const machines = await prisma.machine.findMany({
|
|
where: { status: "active" }
|
|
})
|
|
return NextResponse.json(machines)
|
|
}
|