import { NextResponse } from "next/server";
import prisma from "@/app/prisma";

export async function GET() {
    try {
        const user = await prisma.user.findMany();

        if (user.length < 1) {
            return NextResponse.json({ message: "No users found" }, { status: 200 });
        }

        return NextResponse.json({ message: "Users found" }, { status: 200 });

    } catch (error: any) {
        return NextResponse.json({ error: "Internal Server Error" }, { status: 500 });
    }
}
        