import { NextResponse } from "next/server"; import prisma from "@/app/prisma"; export async function GET() { try { const sites = await prisma.site.findMany(); return NextResponse.json({ sites }, { status: 200 }); } catch (error: any) { return NextResponse.json({ error: "Internal Server Error" }, { status: 500 }); } }