- {% block content %}{% endblock %} + +
+ {% block content %} +
+

Try a Sample Request

+

Use the form below to test an API POST request.

+
+ + +
+
+
+ {% endblock %}
- - - - - + + + + + {% block script %}{% endblock %} diff --git a/backend/server/users/views.py b/backend/server/users/views.py index d5a5a41..5fb7d2a 100644 --- a/backend/server/users/views.py +++ b/backend/server/users/views.py @@ -11,8 +11,8 @@ from django.shortcuts import get_object_or_404 from django.contrib.auth import get_user_model from .serializers import CustomUserDetailsSerializer as PublicUserSerializer from allauth.socialaccount.models import SocialApp -from adventures.serializers import AdventureSerializer, CollectionSerializer -from adventures.models import Adventure, Collection +from adventures.serializers import LocationSerializer, CollectionSerializer +from adventures.models import Location, Collection from allauth.socialaccount.models import SocialAccount User = get_user_model() @@ -99,9 +99,9 @@ class PublicUserDetailView(APIView): user.email = None # Get the users adventures and collections to include in the response - adventures = Adventure.objects.filter(user_id=user, is_public=True) - collections = Collection.objects.filter(user_id=user, is_public=True) - adventure_serializer = AdventureSerializer(adventures, many=True) + adventures = Location.objects.filter(user=user, is_public=True) + collections = Collection.objects.filter(user=user, is_public=True) + adventure_serializer = LocationSerializer(adventures, many=True) collection_serializer = CollectionSerializer(collections, many=True) return Response({ diff --git a/backend/server/worldtravel/management/commands/bulk-adventure-geocode.py b/backend/server/worldtravel/management/commands/bulk-adventure-geocode.py index 1a5d7a5..fff255e 100644 --- a/backend/server/worldtravel/management/commands/bulk-adventure-geocode.py +++ b/backend/server/worldtravel/management/commands/bulk-adventure-geocode.py @@ -1,12 +1,12 @@ from django.core.management.base import BaseCommand -from adventures.models import Adventure +from adventures.models import Location import time class Command(BaseCommand): help = 'Bulk geocode all adventures by triggering save on each one' def handle(self, *args, **options): - adventures = Adventure.objects.all() + adventures = Location.objects.all() total = adventures.count() self.stdout.write(self.style.SUCCESS(f'Starting bulk geocoding of {total} adventures')) diff --git a/backend/server/worldtravel/migrations/0017_rename_user_id_visitedregion_user.py b/backend/server/worldtravel/migrations/0017_rename_user_id_visitedregion_user.py new file mode 100644 index 0000000..6614c77 --- /dev/null +++ b/backend/server/worldtravel/migrations/0017_rename_user_id_visitedregion_user.py @@ -0,0 +1,18 @@ +# Generated by Django 5.2.1 on 2025-06-19 20:24 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('worldtravel', '0016_remove_city_insert_id_remove_country_insert_id_and_more'), + ] + + operations = [ + migrations.RenameField( + model_name='visitedregion', + old_name='user_id', + new_name='user', + ), + ] diff --git a/backend/server/worldtravel/migrations/0018_rename_user_id_visitedcity_user.py b/backend/server/worldtravel/migrations/0018_rename_user_id_visitedcity_user.py new file mode 100644 index 0000000..43cac9d --- /dev/null +++ b/backend/server/worldtravel/migrations/0018_rename_user_id_visitedcity_user.py @@ -0,0 +1,18 @@ +# Generated by Django 5.2.1 on 2025-06-19 20:24 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('worldtravel', '0017_rename_user_id_visitedregion_user'), + ] + + operations = [ + migrations.RenameField( + model_name='visitedcity', + old_name='user_id', + new_name='user', + ), + ] diff --git a/backend/server/worldtravel/models.py b/backend/server/worldtravel/models.py index 9e83f59..e4f69e6 100644 --- a/backend/server/worldtravel/models.py +++ b/backend/server/worldtravel/models.py @@ -6,7 +6,7 @@ from django.contrib.gis.db import models as gis_models User = get_user_model() -default_user_id = 1 # Replace with an actual user ID +default_user = 1 # Replace with an actual user ID class Country(models.Model): @@ -50,29 +50,29 @@ class City(models.Model): class VisitedRegion(models.Model): id = models.AutoField(primary_key=True) - user_id = models.ForeignKey( - User, on_delete=models.CASCADE, default=default_user_id) + user = models.ForeignKey( + User, on_delete=models.CASCADE, default=default_user) region = models.ForeignKey(Region, on_delete=models.CASCADE) def __str__(self): - return f'{self.region.name} ({self.region.country.country_code}) visited by: {self.user_id.username}' + return f'{self.region.name} ({self.region.country.country_code}) visited by: {self.user.username}' def save(self, *args, **kwargs): - if VisitedRegion.objects.filter(user_id=self.user_id, region=self.region).exists(): + if VisitedRegion.objects.filter(user=self.user, region=self.region).exists(): raise ValidationError("Region already visited by user.") super().save(*args, **kwargs) class VisitedCity(models.Model): id = models.AutoField(primary_key=True) - user_id = models.ForeignKey( - User, on_delete=models.CASCADE, default=default_user_id) + user = models.ForeignKey( + User, on_delete=models.CASCADE, default=default_user) city = models.ForeignKey(City, on_delete=models.CASCADE) def __str__(self): - return f'{self.city.name} ({self.city.region.name}) visited by: {self.user_id.username}' + return f'{self.city.name} ({self.city.region.name}) visited by: {self.user.username}' def save(self, *args, **kwargs): - if VisitedCity.objects.filter(user_id=self.user_id, city=self.city).exists(): + if VisitedCity.objects.filter(user=self.user, city=self.city).exists(): raise ValidationError("City already visited by user.") super().save(*args, **kwargs) diff --git a/backend/server/worldtravel/serializers.py b/backend/server/worldtravel/serializers.py index 962914b..a325abd 100644 --- a/backend/server/worldtravel/serializers.py +++ b/backend/server/worldtravel/serializers.py @@ -25,7 +25,7 @@ class CountrySerializer(serializers.ModelSerializer): user = getattr(request, 'user', None) if user and user.is_authenticated: - return VisitedRegion.objects.filter(region__country=obj, user_id=user).count() + return VisitedRegion.objects.filter(region__country=obj, user=user).count() return 0 @@ -62,8 +62,8 @@ class VisitedRegionSerializer(CustomModelSerializer): class Meta: model = VisitedRegion - fields = ['id', 'user_id', 'region', 'longitude', 'latitude', 'name'] - read_only_fields = ['user_id', 'id', 'longitude', 'latitude', 'name'] + fields = ['id', 'user', 'region', 'longitude', 'latitude', 'name'] + read_only_fields = ['user', 'id', 'longitude', 'latitude', 'name'] class VisitedCitySerializer(CustomModelSerializer): longitude = serializers.DecimalField(source='city.longitude', max_digits=9, decimal_places=6, read_only=True) @@ -72,5 +72,5 @@ class VisitedCitySerializer(CustomModelSerializer): class Meta: model = VisitedCity - fields = ['id', 'user_id', 'city', 'longitude', 'latitude', 'name'] - read_only_fields = ['user_id', 'id', 'longitude', 'latitude', 'name'] \ No newline at end of file + fields = ['id', 'user', 'city', 'longitude', 'latitude', 'name'] + read_only_fields = ['user', 'id', 'longitude', 'latitude', 'name'] \ No newline at end of file diff --git a/backend/server/worldtravel/views.py b/backend/server/worldtravel/views.py index c77309d..c418bf3 100644 --- a/backend/server/worldtravel/views.py +++ b/backend/server/worldtravel/views.py @@ -13,7 +13,7 @@ from django.contrib.gis.geos import Point from django.conf import settings from rest_framework.decorators import action from django.contrib.staticfiles import finders -from adventures.models import Adventure +from adventures.models import Location @api_view(['GET']) @permission_classes([IsAuthenticated]) @@ -28,7 +28,7 @@ def regions_by_country(request, country_code): @permission_classes([IsAuthenticated]) def visits_by_country(request, country_code): country = get_object_or_404(Country, country_code=country_code) - visits = VisitedRegion.objects.filter(region__country=country, user_id=request.user.id) + visits = VisitedRegion.objects.filter(region__country=country, user=request.user.id) serializer = VisitedRegionSerializer(visits, many=True) return Response(serializer.data) @@ -45,7 +45,7 @@ def cities_by_region(request, region_id): @permission_classes([IsAuthenticated]) def visits_by_region(request, region_id): region = get_object_or_404(Region, id=region_id) - visits = VisitedCity.objects.filter(city__region=region, user_id=request.user.id) + visits = VisitedCity.objects.filter(city__region=region, user=request.user.id) serializer = VisitedCitySerializer(visits, many=True) return Response(serializer.data) @@ -71,7 +71,7 @@ class CountryViewSet(viewsets.ReadOnlyModelViewSet): # make a post action that will get all of the users adventures and check if the point is in any of the regions if so make a visited region object for that user if it does not already exist @action(detail=False, methods=['post']) def region_check_all_adventures(self, request): - adventures = Adventure.objects.filter(user_id=request.user.id, type='visited') + adventures = Location.objects.filter(user=request.user.id, type='visited') count = 0 for adventure in adventures: if adventure.latitude is not None and adventure.longitude is not None: @@ -79,8 +79,8 @@ class CountryViewSet(viewsets.ReadOnlyModelViewSet): point = Point(float(adventure.longitude), float(adventure.latitude), srid=4326) region = Region.objects.filter(geometry__contains=point).first() if region: - if not VisitedRegion.objects.filter(user_id=request.user.id, region=region).exists(): - VisitedRegion.objects.create(user_id=request.user, region=region) + if not VisitedRegion.objects.filter(user=request.user.id, region=region).exists(): + VisitedRegion.objects.create(user=request.user, region=region) count += 1 except Exception as e: print(f"Error processing adventure {adventure.id}: {e}") @@ -97,14 +97,14 @@ class VisitedRegionViewSet(viewsets.ModelViewSet): permission_classes = [IsAuthenticated] def get_queryset(self): - return VisitedRegion.objects.filter(user_id=self.request.user.id) + return VisitedRegion.objects.filter(user=self.request.user.id) def perform_create(self, serializer): - serializer.save(user_id=self.request.user) + serializer.save(user=self.request.user) def create(self, request, *args, **kwargs): - request.data['user_id'] = request.user - if VisitedRegion.objects.filter(user_id=request.user.id, region=request.data['region']).exists(): + request.data['user'] = request.user + if VisitedRegion.objects.filter(user=request.user.id, region=request.data['region']).exists(): return Response({"error": "Region already visited by user."}, status=400) serializer = self.get_serializer(data=request.data) serializer.is_valid(raise_exception=True) @@ -115,7 +115,7 @@ class VisitedRegionViewSet(viewsets.ModelViewSet): def destroy(self, request, **kwargs): # delete by region id region = get_object_or_404(Region, id=kwargs['pk']) - visited_region = VisitedRegion.objects.filter(user_id=request.user.id, region=region) + visited_region = VisitedRegion.objects.filter(user=request.user.id, region=region) if visited_region.exists(): visited_region.delete() return Response(status=status.HTTP_204_NO_CONTENT) @@ -127,27 +127,27 @@ class VisitedCityViewSet(viewsets.ModelViewSet): permission_classes = [IsAuthenticated] def get_queryset(self): - return VisitedCity.objects.filter(user_id=self.request.user.id) + return VisitedCity.objects.filter(user=self.request.user.id) def perform_create(self, serializer): - serializer.save(user_id=self.request.user) + serializer.save(user=self.request.user) def create(self, request, *args, **kwargs): - request.data['user_id'] = request.user + request.data['user'] = request.user serializer = self.get_serializer(data=request.data) serializer.is_valid(raise_exception=True) self.perform_create(serializer) # if the region is not visited, visit it region = serializer.validated_data['city'].region - if not VisitedRegion.objects.filter(user_id=request.user.id, region=region).exists(): - VisitedRegion.objects.create(user_id=request.user, region=region) + if not VisitedRegion.objects.filter(user=request.user.id, region=region).exists(): + VisitedRegion.objects.create(user=request.user, region=region) headers = self.get_success_headers(serializer.data) return Response(serializer.data, status=status.HTTP_201_CREATED, headers=headers) def destroy(self, request, **kwargs): # delete by city id city = get_object_or_404(City, id=kwargs['pk']) - visited_city = VisitedCity.objects.filter(user_id=request.user.id, city=city) + visited_city = VisitedCity.objects.filter(user=request.user.id, city=city) if visited_city.exists(): visited_city.delete() return Response(status=status.HTTP_204_NO_CONTENT) diff --git a/brand/banner.png b/brand/banner.png index a0dd0ae..f71e3c0 100644 Binary files a/brand/banner.png and b/brand/banner.png differ diff --git a/brand/screenshots/adventures.png b/brand/screenshots/adventures.png index 96204df..9082dd7 100644 Binary files a/brand/screenshots/adventures.png and b/brand/screenshots/adventures.png differ diff --git a/brand/screenshots/countries.png b/brand/screenshots/countries.png index 6eecc59..e7f5e1e 100644 Binary files a/brand/screenshots/countries.png and b/brand/screenshots/countries.png differ diff --git a/brand/screenshots/dashboard.png b/brand/screenshots/dashboard.png index 05ca982..e885f6f 100644 Binary files a/brand/screenshots/dashboard.png and b/brand/screenshots/dashboard.png differ diff --git a/brand/screenshots/details.png b/brand/screenshots/details.png index 47c99fa..051c5c4 100644 Binary files a/brand/screenshots/details.png and b/brand/screenshots/details.png differ diff --git a/brand/screenshots/edit.png b/brand/screenshots/edit.png index 1fce199..04480ce 100644 Binary files a/brand/screenshots/edit.png and b/brand/screenshots/edit.png differ diff --git a/brand/screenshots/itinerary.png b/brand/screenshots/itinerary.png index c11cf4e..06d44f4 100644 Binary files a/brand/screenshots/itinerary.png and b/brand/screenshots/itinerary.png differ diff --git a/brand/screenshots/map.png b/brand/screenshots/map.png index 081cb79..4ca76e1 100644 Binary files a/brand/screenshots/map.png and b/brand/screenshots/map.png differ diff --git a/brand/screenshots/regions.png b/brand/screenshots/regions.png index 4aea537..e6ae02c 100644 Binary files a/brand/screenshots/regions.png and b/brand/screenshots/regions.png differ diff --git a/documentation/docs/intro/adventurelog_overview.md b/documentation/docs/intro/adventurelog_overview.md index 80cf63d..d9e022c 100644 --- a/documentation/docs/intro/adventurelog_overview.md +++ b/documentation/docs/intro/adventurelog_overview.md @@ -1,6 +1,6 @@ # About AdventureLog -Starting from a simple idea of tracking travel locations (called adventures), AdventureLog has grown into a full-fledged travel companion. With AdventureLog, you can log your adventures, keep track of where you've been on the world map, plan your next trip collaboratively, and share your experiences with friends and family. **AdventureLog is the ultimate travel companion for the modern-day explorer**. +Starting from a simple idea of tracking travel locations, AdventureLog has grown into a full-fledged travel companion. With AdventureLog, you can log your adventures, keep track of where you've been on the world map, plan your next trip collaboratively, and share your experiences with friends and family. **AdventureLog is the ultimate travel companion for the modern-day explorer**. ## Features diff --git a/documentation/docs/usage/usage.md b/documentation/docs/usage/usage.md index aa27cf3..c85a0f7 100644 --- a/documentation/docs/usage/usage.md +++ b/documentation/docs/usage/usage.md @@ -4,18 +4,23 @@ Welcome to AdventureLog! This guide will help you get started with AdventureLog ## Key Terms -#### Adventures +#### Locations -- **Adventure**: think of an adventure as a point on a map, a location you want to visit, or a place you want to explore. An adventure can be anything you want it to be, from a local park to a famous landmark. -- **Visit**: a visit is added to an adventure. It contains a date and notes about when the adventure was visited. If an adventure is visited multiple times, multiple visits can be added. If there are no visits on an adventure or the date of all visits is in the future, the adventure is considered planned. If the date of the visit is in the past, the adventure is considered completed. -- **Category**: a category is a way to group adventures together. For example, you could have a category for parks, a category for museums, and a category for restaurants. -- **Tag**: a tag is a way to add additional information to an adventure. For example, you could have a tag for the type of cuisine at a restaurant or the type of art at a museum. Multiple tags can be added to an adventure. -- **Image**: an image is a photo that is added to an adventure. Images can be added to an adventure to provide a visual representation of the location or to capture a memory of the visit. These can be uploaded from your device or with a service like [Immich](/docs/configuration/immich_integration) if the integration is enabled. -- **Attachment**: an attachment is a file that is added to an adventure. Attachments can be added to an adventure to provide additional information, such as a map of the location or a brochure from the visit. +::: tip Terminology Update +**Location has replaced Adventure:** +The term "Location" is now used instead of "Adventure" - the usage remains the same, just the name has changed to better reflect the purpose of the feature. +::: + +- **Location**: think of a location as a point on a map, a place you want to visit, have visited, or a place you want to explore. A location can be anything you want it to be, from a local park to a famous landmark. These are the building blocks of AdventureLog and are the fundamental unit of information in the app. +- **Visit**: a visit is added to an location. It contains a date and notes about when the location was visited. If a location is visited multiple times, multiple visits can be added. If there are no visits on a location or the date of all visits is in the future, the location is considered planned. If the date of the visit is in the past, the location is considered completed. +- **Category**: a category is a way to group locations together. For example, you could have a category for parks, a category for museums, and a category for restaurants. +- **Tag**: a tag is a way to add additional information to a location. For example, you could have a tag for the type of cuisine at a restaurant or the type of art at a museum. Multiple tags can be added to a location. +- **Image**: an image is a photo that is added to a location. Images can be added to a location to provide a visual representation or to capture a memory of the visit. These can be uploaded from your device or with a service like [Immich](/docs/configuration/immich_integration) if the integration is enabled. +- **Attachment**: an attachment is a file that is added to a location. Attachments can be added to a location to provide additional information, such as a map of the location or a brochure from the visit. #### Collections -- **Collection**: a collection is a way to group adventures together. Collections are flexible and can be used in many ways. When no start or end date is added to a collection, it acts like a folder to group adventures together. When a start and end date is added to a collection, it acts like a trip to group adventures together that were visited during that time period. With start and end dates, the collection is transformed into a full itinerary with a map showing the route taken between adventures. +- **Collection**: a collection is a way to group locations together. Collections are flexible and can be used in many ways. When no start or end date is added to a collection, it acts like a folder to group locations together. When a start and end date is added to a collection, it acts like a trip to group locations together that were visited during that time period. With start and end dates, the collection is transformed into a full itinerary with a map showing the route taken between locations. For example, you could have a collection for a trip to Europe with dates so you can plan where you want to visit, a collection of local hiking trails, or a collection for a list of restaurants you want to try. - **Transportation**: a transportation is a collection exclusive feature that allows you to add transportation information to your trip. This can be used to show the route taken between locations and the mode of transportation used. It can also be used to track flight information, such as flight number and departure time. - **Lodging**: a lodging is a collection exclusive feature that allows you to add lodging information to your trip. This can be used to plan where you will stay during your trip and add notes about the lodging location. It can also be used to track reservation information, such as reservation number and check-in time. - **Note**: a note is a collection exclusive feature that allows you to add notes to your trip. This can be used to add additional information about your trip, such as a summary of the trip or a list of things to do. Notes can be assigned to a specific day of the trip to help organize the information. diff --git a/frontend/src/lib/components/Avatar.svelte b/frontend/src/lib/components/Avatar.svelte index 28cb952..72f2332 100644 --- a/frontend/src/lib/components/Avatar.svelte +++ b/frontend/src/lib/components/Avatar.svelte @@ -31,9 +31,9 @@ section: 'main' }, { - path: '/adventures', + path: '/locations', icon: MapMarker, - label: 'navbar.my_adventures', + label: 'locations.my_locations', section: 'main' }, { diff --git a/frontend/src/lib/components/CardCarousel.svelte b/frontend/src/lib/components/CardCarousel.svelte index 60f9b38..8b98787 100644 --- a/frontend/src/lib/components/CardCarousel.svelte +++ b/frontend/src/lib/components/CardCarousel.svelte @@ -1,9 +1,9 @@ @@ -509,9 +508,9 @@

- +
-
+
@@ -630,17 +629,17 @@

{wikiError}

- {#if !adventureToEdit || (adventureToEdit.collections && adventureToEdit.collections.length === 0)} + {#if !locationToEdit || (locationToEdit.collections && locationToEdit.collections.length === 0)}
@@ -649,27 +648,27 @@
- +
- {$t('adventures.tags')} ({adventure.activity_types?.length || 0}) + {$t('adventures.tags')} ({location.tags?.length || 0})
- +
- +
@@ -711,11 +710,11 @@
- {$t('adventures.attachments')} ({adventure.attachments?.length || 0}) + {$t('adventures.attachments')} ({location.attachments?.length || 0})
- {#each adventure.attachments as attachment} + {#each location.attachments as attachment}
- {$t('adventures.images')} ({adventure.images?.length || 0}) + {$t('adventures.images')} ({location.images?.length || 0})
{:else} @@ -263,7 +263,7 @@ class="grid grid-cols-1 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 gap-6" > {#each adventures as adventure} - - {$t('adventures.collection_adventures')} + {$t('adventures.collection_locations')}
@@ -503,12 +503,12 @@
diff --git a/frontend/src/routes/locations/[id]/+page.server.ts b/frontend/src/routes/locations/[id]/+page.server.ts new file mode 100644 index 0000000..194770b --- /dev/null +++ b/frontend/src/routes/locations/[id]/+page.server.ts @@ -0,0 +1,76 @@ +import type { PageServerLoad } from './$types'; +const PUBLIC_SERVER_URL = process.env['PUBLIC_SERVER_URL']; +import type { AdditionalLocation, Location, Collection } from '$lib/types'; +const endpoint = PUBLIC_SERVER_URL || 'http://localhost:8000'; + +export const load = (async (event) => { + const id = event.params as { id: string }; + let request = await fetch(`${endpoint}/api/locations/${id.id}/additional-info/`, { + headers: { + Cookie: `sessionid=${event.cookies.get('sessionid')}` + }, + credentials: 'include' + }); + if (!request.ok) { + console.error('Failed to fetch adventure ' + id.id); + return { + props: { + adventure: null + } + }; + } else { + let adventure = (await request.json()) as AdditionalLocation; + + return { + props: { + adventure + } + }; + } +}) satisfies PageServerLoad; + +import { redirect, type Actions } from '@sveltejs/kit'; +import { fetchCSRFToken } from '$lib/index.server'; + +const serverEndpoint = PUBLIC_SERVER_URL || 'http://localhost:8000'; + +export const actions: Actions = { + delete: async (event) => { + const id = event.params as { id: string }; + const adventureId = id.id; + + if (!event.locals.user) { + return redirect(302, '/login'); + } + if (!adventureId) { + return { + status: 400, + error: new Error('Bad request') + }; + } + + let csrfToken = await fetchCSRFToken(); + + let res = await fetch(`${serverEndpoint}/api/locations/${event.params.id}`, { + method: 'DELETE', + headers: { + Referer: event.url.origin, // Include Referer header + Cookie: `sessionid=${event.cookies.get('sessionid')}; + csrftoken=${csrfToken}`, + 'X-CSRFToken': csrfToken + }, + credentials: 'include' + }); + console.log(res); + if (!res.ok) { + return { + status: res.status, + error: new Error('Failed to delete adventure') + }; + } else { + return { + status: 204 + }; + } + } +}; diff --git a/frontend/src/routes/adventures/[id]/+page.svelte b/frontend/src/routes/locations/[id]/+page.svelte similarity index 97% rename from frontend/src/routes/adventures/[id]/+page.svelte rename to frontend/src/routes/locations/[id]/+page.svelte index 3977b9c..1bd3743 100644 --- a/frontend/src/routes/adventures/[id]/+page.svelte +++ b/frontend/src/routes/locations/[id]/+page.svelte @@ -1,5 +1,5 @@ @@ -159,7 +159,7 @@ {/if} - {#if stats && stats.adventure_count > 0} + {#if stats && stats.location_count > 0}
{achievementLevel} @@ -189,9 +189,9 @@
- {$t('navbar.adventures')} + {$t('locations.locations')}
-
{stats.adventure_count}
+
{stats.location_count}
{achievementLevel} @@ -331,14 +331,14 @@
-

{$t('auth.user_adventures')}

-

{$t('profile.public_adventure_experiences')}

+

{$t('auth.user_locations')}

+

{$t('profile.public_location_experiences')}

{#if adventures && adventures.length > 0}
{adventures.length} - {adventures.length === 1 ? $t('adventures.adventure') : $t('navbar.adventures')} + {adventures.length === 1 ? $t('locations.location') : $t('locations.locations')}
{/if}
@@ -350,7 +350,7 @@

- {$t('auth.no_public_adventures')} + {$t('auth.no_public_locations')}

{$t('profile.no_shared_adventures')}

@@ -359,7 +359,7 @@
{#each adventures as adventure}
- +
{/each}
diff --git a/frontend/src/routes/search/+page.server.ts b/frontend/src/routes/search/+page.server.ts index 45838a8..f04ec4f 100644 --- a/frontend/src/routes/search/+page.server.ts +++ b/frontend/src/routes/search/+page.server.ts @@ -33,7 +33,7 @@ export const load = (async (event) => { let data = await res.json(); return { - adventures: data.adventures, + locations: data.locations, collections: data.collections, users: data.users, countries: data.countries, diff --git a/frontend/src/routes/search/+page.svelte b/frontend/src/routes/search/+page.svelte index e0ba98e..b4ba0d7 100644 --- a/frontend/src/routes/search/+page.svelte +++ b/frontend/src/routes/search/+page.svelte @@ -1,5 +1,5 @@