Trying a different await approach.

This commit is contained in:
Bradley Shellnut 2024-12-13 13:02:55 -08:00
parent 036b5ae290
commit 17d8498e2a

View file

@ -48,6 +48,8 @@ export const load: PageServerLoad = async ({ fetch, setHeaders, url }) => {
url: currentPageUrl, url: currentPageUrl,
}); });
const articles = await fetch("/api/articles?page=1&limit=3");
setHeaders({ setHeaders({
"cache-control": "max-age=43200", "cache-control": "max-age=43200",
}); });
@ -55,6 +57,6 @@ export const load: PageServerLoad = async ({ fetch, setHeaders, url }) => {
baseUrl, baseUrl,
metaTagsChild: metaTags, metaTagsChild: metaTags,
albums: await fetchBandcampAlbums(), albums: await fetchBandcampAlbums(),
articlesData: await (await fetch("/api/articles?page=1&limit=3")).json(), articlesData: await articles.json(),
}; };
}; };