feat: Add location and activity type to Point type

chore: Update adventure image upload logic
This commit is contained in:
Sean Morley
2024-08-17 07:58:07 -04:00
parent 03927a2394
commit a264da39f5
3 changed files with 361 additions and 349 deletions

View File

@@ -425,5 +425,17 @@ export const actions: Actions = {
let image_url = adventure.image;
let link_url = adventure.link;
return { image_url, link_url };
},
image: async (event) => {
let formData = await event.request.formData();
let res = await fetch(`${serverEndpoint}/api/images/`, {
method: 'POST',
headers: {
Cookie: `${event.cookies.get('auth')}`
},
body: formData
});
let data = await res.json();
return data;
}
};