feat(song): add option to exclude songs from global visibility and improve admin upload validation

This commit is contained in:
Hördle Bot
2025-11-24 19:59:47 +01:00
parent 326023a705
commit 67cf85dc22
7 changed files with 174 additions and 18 deletions

View File

@@ -33,7 +33,7 @@ export async function getOrCreateDailyPuzzle(genreName: string | null = null) {
// Get songs available for this genre
const whereClause = genreId
? { genres: { some: { id: genreId } } }
: {}; // Global puzzle picks from ALL songs
: { excludeFromGlobal: false }; // Global puzzle picks from ALL songs (except excluded)
const allSongs = await prisma.song.findMany({
where: whereClause,