Add activity types to EditModal component and update server files

This commit is contained in:
Sean Morley
2024-05-01 00:14:31 +00:00
parent 6a4771cece
commit 2da4baf8a1
2 changed files with 27 additions and 1 deletions

View File

@@ -157,7 +157,7 @@ export async function PUT(event: RequestEvent): Promise<Response> {
// get properties from the body
const { newAdventure } = await event.request.json();
console.log(newAdventure);
const { name, location, date, id, description } = newAdventure;
const { name, location, date, id, description, activityTypes } = newAdventure;
// update the adventure in the user's visited list
await db
@@ -167,6 +167,7 @@ export async function PUT(event: RequestEvent): Promise<Response> {
location: location,
date: date,
description: description,
activityTypes: JSON.stringify(activityTypes),
})
.where(
and(