import { NextResponse } from 'next/server'; import { PrismaClient } from '@prisma/client'; const prisma = new PrismaClient(); // Öffentliche, schreibgeschützte Song-Liste für das Spiel (GuessInput etc.). // Kein Auth, nur Lesen der nötigsten Felder. export async function GET() { const songs = await prisma.song.findMany({ orderBy: { createdAt: 'desc' }, select: { id: true, title: true, artist: true, }, }); return NextResponse.json(songs); }