1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-24 23:39:37 +02:00

Activity type fixes

This commit is contained in:
Sean Morley 2024-08-13 15:09:45 -04:00
parent 70a2fc45fd
commit 2a072f22cb
3 changed files with 42 additions and 6 deletions

View file

@ -11,16 +11,16 @@
}
onMount(async () => {
let res = await fetch('/api/activity-types/types/', {
method: 'GET',
let res = await fetch('/activities', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
}
});
let data = await res.json();
console.log('ACTIVITIES' + data);
if (data) {
allActivities = data;
console.log('ACTIVITIES' + data.activities);
if (data && data.activities) {
allActivities = data.activities;
}
});