feat(song): add option to exclude songs from global visibility and improve admin upload validation
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user