Skip to content

Commit

Permalink
Another build fix attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
xzippyzachx committed Apr 18, 2024
1 parent 421925f commit 16d776f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
19 changes: 12 additions & 7 deletions src/routes/projects/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
13 changes: 9 additions & 4 deletions src/routes/zine/+page.js
Original file line number Diff line number Diff line change
@@ -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
};
};
}
}

0 comments on commit 16d776f

Please sign in to comment.