Fixing sitemap to use the event.fetch

This commit is contained in:
Bradley Shellnut 2024-05-30 13:28:32 -07:00
parent 2a9f41c701
commit 0d9b0839dc

View file

@ -4,7 +4,7 @@ import type { ArticlePageLoad } from '$lib/types/article';
const site = `https://${PUBLIC_URL}`;
export const GET: RequestHandler = async function GET({ setHeaders }) {
export const GET: RequestHandler = async function GET({ fetch, setHeaders }) {
const resp = await fetch(`/api/articles`);
const { totalPages }: ArticlePageLoad = await resp.json();