From db9e771310efad1210b34159626b485d4539aba4 Mon Sep 17 00:00:00 2001 From: Sean Morley Date: Thu, 1 Aug 2024 18:18:07 -0400 Subject: [PATCH] refactor: Update API request in ActivityComplete.svelte and add adventure search button in +page.svelte --- frontend/src/lib/components/ActivityComplete.svelte | 8 +++++++- frontend/src/routes/activities/+page.svelte | 12 ++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/frontend/src/lib/components/ActivityComplete.svelte b/frontend/src/lib/components/ActivityComplete.svelte index 773f7719..58a14370 100644 --- a/frontend/src/lib/components/ActivityComplete.svelte +++ b/frontend/src/lib/components/ActivityComplete.svelte @@ -11,8 +11,14 @@ } onMount(async () => { - let res = await fetch('/api/activity-types/types/'); + let res = await fetch('/api/activity-types/types/', { + method: 'GET', + headers: { + 'Content-Type': 'application/json' + } + }); let data = await res.json(); + console.log('ACTIVITIES' + data); if (data) { allActivities = data; } diff --git a/frontend/src/routes/activities/+page.svelte b/frontend/src/routes/activities/+page.svelte index ef05f3fe..3af4ef2b 100644 --- a/frontend/src/routes/activities/+page.svelte +++ b/frontend/src/routes/activities/+page.svelte @@ -1,4 +1,5 @@