Fixing sitemap to use the event.fetch

This commit is contained in:
Bradley Shellnut 2024-05-30 13:28:32 -07:00
parent ec57d221f4
commit 3ed5dc8e81

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();