Files
ef_front/app/api/notice/item/route.ts
2025-09-07 22:57:43 +00:00

19 lines
410 B
TypeScript

import { PrismaClient } from '../../../generated/prisma/client';
const prisma = new PrismaClient();
export async function GET() {
const notices = await prisma.noticeBoard.findMany({
where: {
isDeleted: false,
},
select: {
id: true,
title: true,
pubDate: true,
tag: true,
// 필요한 다른 필드들도 추가
},
});
return Response.json(notices);
}