Working on Standartisation.... #TODO

This commit is contained in:
Rudi committed 2026-08-27 18:07:42 +02:00
1 parent da4d67ea47
commit bdc864cf94
8 files changed
+104 -36

No files matched your search

+3 -4
View File
@@ -1,8 +1,6 @@
// @wikiCategory: Stream
import { NextResponse } from "next/server";
import { getSongById } from "@/lib/db/song";
import { getSongBookById } from "@/lib/db/songbook";
let currentSong = {
@@ -58,8 +56,9 @@ export async function POST(request: Request) {
number
};
const payload = JSON.stringify(currentSong);
clients.forEach((send) => send(payload));
clients.forEach((controller) => {
controller.enqueue(`data: ${JSON.stringify(currentSong)}\n\n`);
});
return NextResponse.json({ success: true , currentSong }, { status: 200 });
} catch (error) {