feat: add abilty to attach song to songbook
This commit is contained in:
1 parent
001a0d6ef8
commit
e3115df0bd
3 files changed
+46
-14
No files matched your search
@@ -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 }
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user