From 16d776fdd852fa248e6228bd087dd6874c107c67 Mon Sep 17 00:00:00 2001 From: Zachary Ross Date: Wed, 17 Apr 2024 20:52:54 -0400 Subject: [PATCH] Another build fix attempt --- src/routes/projects/+page.svelte | 19 ++++++++++++------- src/routes/zine/+page.js | 13 +++++++++---- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/routes/projects/+page.svelte b/src/routes/projects/+page.svelte index 76e8db0..1e6be42 100644 --- a/src/routes/projects/+page.svelte +++ b/src/routes/projects/+page.svelte @@ -7,16 +7,21 @@ export let clubProjects = []; onMount(async () => { - const response = await fetch("/api/jam-games"); + const response = await fetch("/api/jam-games", { + method: 'GET', + headers: { + 'Accept': 'application/json' + } + }) let jamGames = (await response.json()).data; jamGames.forEach((game) => { - clubProjects.push({ - name: game.game.title, - author: game.game.user.name, - url: game.game.url, - image: game.game.cover, - }); + clubProjects.push({ + name: game.game.title, + author: game.game.user.name, + url: game.game.url, + image: game.game.cover, + }); }); clubProjects = clubProjects; diff --git a/src/routes/zine/+page.js b/src/routes/zine/+page.js index 7a2b174..f194a94 100644 --- a/src/routes/zine/+page.js +++ b/src/routes/zine/+page.js @@ -1,8 +1,13 @@ export const load = async ({ fetch }) => { - const response = await fetch(`/api/posts`); - const posts = await response.json(); + const response = await fetch(`/api/posts`, { + method: 'GET', + headers: { + 'Accept': 'application/json' + } + }) + let posts = await response.json() return { posts - }; -}; \ No newline at end of file + } +} \ No newline at end of file