12 lines
356 B
TypeScript
Raw Normal View History

2025-05-18 12:12:49 +02:00
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 });
}
}