mirror of
https://github.com/BradNut/personal-website-sveltekit
synced 2025-09-08 23:20:18 +00:00
Trying a different await approach.
This commit is contained in:
parent
036b5ae290
commit
17d8498e2a
1 changed files with 3 additions and 1 deletions
|
|
@ -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(),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue