fix(api): include song count in specials list

This commit is contained in:
Hördle Bot
2025-11-23 02:15:12 +01:00
parent 5fb450d37e
commit c05ead4493

View File

@@ -6,6 +6,11 @@ const prisma = new PrismaClient();
export async function GET() { export async function GET() {
const specials = await prisma.special.findMany({ const specials = await prisma.special.findMany({
orderBy: { name: 'asc' }, orderBy: { name: 'asc' },
include: {
_count: {
select: { songs: true }
}
}
}); });
return NextResponse.json(specials); return NextResponse.json(specials);
} }