maj url photo + page 404 + gestion programmation d'article
This commit is contained in:
@@ -6,6 +6,12 @@ import { generateSlug } from '@/lib/utils'
|
||||
export async function GET() {
|
||||
try {
|
||||
const posts = await prisma.blogPost.findMany({
|
||||
where: {
|
||||
status: 'PUBLISHED',
|
||||
publishedAt: {
|
||||
lte: new Date()
|
||||
}
|
||||
},
|
||||
orderBy: { date: 'desc' },
|
||||
})
|
||||
return NextResponse.json(posts)
|
||||
|
||||
Reference in New Issue
Block a user