1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-24 15:29:36 +02:00

feat: Remove locations API call and implement random background image in stats view

This commit is contained in:
Sean Morley 2025-02-16 12:27:49 -05:00
parent d31b95289d
commit 00f0fc9acf
3 changed files with 12 additions and 49 deletions

View file

@ -48,11 +48,4 @@ class StatsViewSet(viewsets.ViewSet):
'total_regions': total_regions,
'visited_country_count': visited_country_count,
'total_countries': total_countries
})
# locations - returns a list of all of the latitude, longitude locations of all public adventrues on the server
@action(detail=False, methods=['get'], url_path='locations')
def locations(self, request):
adventures = Adventure.objects.filter(
is_public=True).values('latitude', 'longitude', 'id', 'name')
return Response(adventures)
})