Fix collection link

This commit is contained in:
Sean Morley
2024-08-11 13:34:32 -04:00
parent cd55437f91
commit 5aef1eb8bd
3 changed files with 16 additions and 14 deletions

View File

@@ -146,15 +146,13 @@ export const actions: Actions = {
};
}
let trip_id_number: number = parseInt(trip_id as string);
let res = await fetch(`${serverEndpoint}/api/adventures/${event.params.id}/`, {
method: 'PATCH',
headers: {
Cookie: `${event.cookies.get('auth')}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ collection: trip_id_number })
body: JSON.stringify({ collection: trip_id })
});
let res2 = await res.json();
console.log(res2);

View File

@@ -171,7 +171,7 @@
<span class="text-sm text-muted-foreground">{adventure.location}</span>
</div>
{/if}
{#if adventure.activity_types}
{#if adventure.activity_types && adventure.activity_types?.length > 0}
<div class="flex items-center gap-2">
<svg
xmlns="http://www.w3.org/2000/svg"