API work on SongbookSongs

This commit is contained in:
Rudi committed 2026-08-27 14:59:19 +02:00
1 parent 4bdf03426c
commit b060ab29cf
10 files changed
+347 -119

No files matched your search

+3
View File
@@ -125,6 +125,9 @@ export async function searchSongsByTitle(query: string, limit: number = 20) {
*/
export async function createSong(data: { title: string }) {
try{
if(!data.title){
return { success: false, status: 400, error: "Field 'title' is required" };
}
const song = await prisma.song.create({
data: {
title: data.title.trim()