feat: add abilty to attach song to songbook

This commit is contained in:
robin committed 2026-07-28 15:53:51 +02:00
1 parent 001a0d6ef8
commit e3115df0bd
3 files changed
+46 -14

No files matched your search

+2 -2
View File
@@ -6,9 +6,9 @@ export async function POST(request: Request) {
const body = await request.json();
const { songId, songbookId, number } = body;
if (!songId || !songbookId || !number) {
if (isNaN(songId) || isNaN(songbookId) || !number) {
return NextResponse.json(
{ error: "songId, songbookId und number sind erforderlich." },
{ error: "Ungültige IDs oder fehlende Nummer." },
{ status: 400 }
);
}