Skip to content

Commit

Permalink
Even more build fix attempts
Browse files Browse the repository at this point in the history
  • Loading branch information
xzippyzachx committed Apr 18, 2024
1 parent 16d776f commit 408e566
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 15 deletions.
24 changes: 16 additions & 8 deletions src/routes/projects/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,21 @@
export let clubProjects = [];
onMount(async () => {
const response = await fetch("/api/jam-games", {
method: 'GET',
headers: {
'Accept': 'application/json'
}
})
let jamGames = (await response.json()).data;
let jamGames = []
try {
const response = await fetch(`/api/jam-games`, {
method: 'GET',
headers: {
'Accept': 'application/json'
}
})
const responseText = await response.text()
jamGames = JSON.parse(responseText).data
}
catch (error)
{
console.log(error)
}
jamGames.forEach((game) => {
clubProjects.push({
Expand All @@ -24,7 +32,7 @@
});
});
clubProjects = clubProjects;
clubProjects = clubProjects
});
</script>

Expand Down
23 changes: 16 additions & 7 deletions src/routes/zine/+page.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
export const load = async ({ fetch }) => {
const response = await fetch(`/api/posts`, {
method: 'GET',
headers: {
'Accept': 'application/json'
}
})
let posts = await response.json()

let posts = []
try {
const response = await fetch(`/api/posts`, {
method: 'GET',
headers: {
'Accept': 'application/json'
}
})
const responseText = await response.text()
posts = JSON.parse(responseText)
}
catch (error)
{
console.log(error)
}

return {
posts
Expand Down

0 comments on commit 408e566

Please sign in to comment.