feat: Add activity types functionality to CreateNewAdventure and AdventureCard components

This commit is contained in:
Sean Morley
2024-05-04 00:43:18 +00:00
parent eab7cb6087
commit 3127784632
4 changed files with 38 additions and 17 deletions

View File

@@ -11,12 +11,7 @@
});
async function add(event: CustomEvent<Adventure>) {
let newAdventure: Adventure = {
name: event.detail.name,
location: event.detail.location,
type: "mylog",
id: -1,
};
let detailAdventure = event.detail;
const response = await fetch("/api/visits", {
method: "POST",
@@ -24,7 +19,7 @@
"Content-Type": "application/json",
},
body: JSON.stringify({
newAdventure,
detailAdventure,
}),
});