Fix audio playback for newly uploaded files by using dynamic API route
This commit is contained in:
@@ -98,7 +98,7 @@ export async function getOrCreateDailyPuzzle(genreName: string | null = null) {
|
||||
|
||||
return {
|
||||
id: dailyPuzzle.id,
|
||||
audioUrl: `/uploads/${dailyPuzzle.song.filename}`,
|
||||
audioUrl: `/api/audio/${dailyPuzzle.song.filename}`,
|
||||
songId: dailyPuzzle.songId,
|
||||
title: dailyPuzzle.song.title,
|
||||
artist: dailyPuzzle.song.artist,
|
||||
@@ -185,7 +185,7 @@ export async function getOrCreateSpecialPuzzle(specialName: string) {
|
||||
|
||||
return {
|
||||
id: dailyPuzzle.id,
|
||||
audioUrl: `/uploads/${dailyPuzzle.song.filename}`,
|
||||
audioUrl: `/api/audio/${dailyPuzzle.song.filename}`,
|
||||
songId: dailyPuzzle.songId,
|
||||
title: dailyPuzzle.song.title,
|
||||
artist: dailyPuzzle.song.artist,
|
||||
|
||||
Reference in New Issue
Block a user