chore: pnpm up
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
---
|
||||
import Layout from "@layouts/Layout.astro";
|
||||
import * as memorium from "@helpers/memorium";
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const response = await fetch(
|
||||
"http://localhost:8080/resources?name=Media/movies/*",
|
||||
);
|
||||
const movieReviews = await response.json();
|
||||
const movieReviews = await memorium.listResource("Media/movies/*");
|
||||
|
||||
const paths = movieReviews.map((review: any) => {
|
||||
return {
|
||||
@@ -16,16 +14,21 @@ export async function getStaticPaths() {
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
return paths;
|
||||
}
|
||||
|
||||
const response = await fetch(
|
||||
const reviews = await memorium.listResource(
|
||||
//@ts-ignore
|
||||
`http://localhost:8080/resources?name=Media/movies/${Astro.params.movieName}.md`,
|
||||
`Media/movies/${Astro.params.movieName}.md`,
|
||||
);
|
||||
const reviewes = await response.json();
|
||||
const review = reviewes[0];
|
||||
|
||||
if (reviews.length === 0) {
|
||||
return new Response(null, {
|
||||
status: 404,
|
||||
statusText: "Not found",
|
||||
});
|
||||
}
|
||||
const review = reviews[0];
|
||||
---
|
||||
|
||||
<Layout title="Max Richter">
|
||||
|
||||
Reference in New Issue
Block a user