headlesdev 94ba5e20c6 Revert "cleanup v2"
This reverts commit 8b82578809528b7163ea7003d0a4734d93522263.
2025-05-17 12:31:27 +02:00

16 lines
422 B
TypeScript

import { NextResponse, NextRequest } from "next/server";
import { prisma } from "@/lib/prisma";
export async function POST(request: NextRequest) {
try {
const notifications = await prisma.notification.findMany();
return NextResponse.json({
notifications
});
} catch (error: any) {
return NextResponse.json({ error: error.message }, { status: 500 });
}
}