diff --git a/frontend/app/page.tsx b/frontend/app/page.tsx index c1c3758..15d343d 100644 --- a/frontend/app/page.tsx +++ b/frontend/app/page.tsx @@ -23,13 +23,13 @@ interface Show { interface Song { id: number title: string - times_played?: number + performance_count?: number avg_rating?: number } async function getRecentShows(): Promise { try { - const res = await fetch(`${getApiUrl()}/shows?limit=8&sort=date&order=desc`, { + const res = await fetch(`${getApiUrl()}/shows/recent?limit=8`, { cache: 'no-store', next: { revalidate: 60 } }) @@ -43,7 +43,7 @@ async function getRecentShows(): Promise { async function getTopSongs(): Promise { try { - const res = await fetch(`${getApiUrl()}/songs?limit=5&sort=times_played&order=desc`, { + const res = await fetch(`${getApiUrl()}/stats/top-songs?limit=5`, { cache: 'no-store', next: { revalidate: 300 } }) @@ -182,9 +182,9 @@ export default async function Home() {
{song.title}
- {song.times_played && ( + {song.performance_count && (
- {song.times_played} performances + {song.performance_count} performances
)}