fix: add trailing slashes to API URLs for SSR compatibility
Some checks failed
Deploy Fediversion / deploy (push) Failing after 1s
Some checks failed
Deploy Fediversion / deploy (push) Failing after 1s
This commit is contained in:
parent
7d10d195f3
commit
5eb8edf209
2 changed files with 3 additions and 3 deletions
|
|
@ -18,7 +18,7 @@ export function generateStaticParams() {
|
|||
|
||||
async function getRecentShows(verticalSlug: string) {
|
||||
try {
|
||||
const res = await fetch(`${getApiUrl()}/shows?vertical_slugs=${verticalSlug}&limit=8&status=past`, {
|
||||
const res = await fetch(`${getApiUrl()}/shows/?vertical_slugs=${verticalSlug}&limit=8&status=past`, {
|
||||
next: { revalidate: 60 }
|
||||
})
|
||||
if (!res.ok) return []
|
||||
|
|
@ -30,7 +30,7 @@ async function getRecentShows(verticalSlug: string) {
|
|||
|
||||
async function getTopSongs(verticalSlug: string) {
|
||||
try {
|
||||
const res = await fetch(`${getApiUrl()}/songs?vertical_slug=${verticalSlug}&limit=5&sort=times_played`, {
|
||||
const res = await fetch(`${getApiUrl()}/songs/?vertical_slug=${verticalSlug}&limit=5&sort=times_played`, {
|
||||
next: { revalidate: 60 }
|
||||
})
|
||||
if (!res.ok) return []
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export function generateStaticParams() {
|
|||
|
||||
async function getShows(verticalSlug: string) {
|
||||
try {
|
||||
const res = await fetch(`${getApiUrl()}/shows?vertical=${verticalSlug}`, {
|
||||
const res = await fetch(`${getApiUrl()}/shows/?vertical=${verticalSlug}`, {
|
||||
next: { revalidate: 60 }
|
||||
})
|
||||
if (!res.ok) return []
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue