Skip to content

Commit

Permalink
Use status
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOtterlord committed Jan 24, 2025
1 parent 015183c commit 3ce5754
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/themes/author/[id]/[...page].astro
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ const currentPage =
// invalid page number!
if (!currentPage || Number.isNaN(currentPage)) {
return Astro.redirect('/404');
return Astro.redirect('/404', 404);
}
const res = await fetch(
`${THEMES_API_URL}/api/themes/author?id=${Astro.params.id}`,
);
if (res.status !== 200) return Astro.redirect('/404');
if (res.status !== 200) return Astro.redirect('/404', 404);
const allThemes: ThemeAndAuthor[] = await res.json();
Expand Down

0 comments on commit 3ce5754

Please sign in to comment.