mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-18 07:56:57 +00:00
16 lines
422 B
TypeScript
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 });
|
|
}
|
|
} |