fix: create song
This commit is contained in:
1 parent
583ef90a7b
commit
fde1f27745
4 files changed
+112
-97
No files matched your search
@@ -2,7 +2,6 @@
|
||||
|
||||
import { error } from "console";
|
||||
import Papa from "papaparse";
|
||||
import { addSongToSongbook } from "@/lib/db/managing";
|
||||
|
||||
interface CSVRow {
|
||||
nummer: string;
|
||||
@@ -31,8 +30,8 @@ export async function uploadCSVAction(formData:FormData) {
|
||||
|
||||
console.log("Data:", rows);
|
||||
rows.forEach(row => {
|
||||
//console.log(`Nummer: ${row.number}, Titel: ${row.titel}`);
|
||||
addSongToSongbook(String(row.titel), Number(songbookId), String(row.nummer))
|
||||
console.log(`Nummer: ${row.nummer}, Titel: ${row.titel}`);
|
||||
//addSongToSongbook(String(row.titel), Number(songbookId), String(row.nummer))
|
||||
});
|
||||
|
||||
return { success: true, message: `${rows.length} Zeilen erfolgreich importiert.`};
|
||||
|
||||
Reference in new issue
Block a user