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