From 13124aca6b62a941500c7b06556275f68ca45586 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Mon, 12 Feb 2024 12:42:27 -0500 Subject: [PATCH] [locations] Need to spoof user in gps webhook --- vrobbler/apps/scrobbles/views.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vrobbler/apps/scrobbles/views.py b/vrobbler/apps/scrobbles/views.py index 65c64cd..772a51c 100644 --- a/vrobbler/apps/scrobbles/views.py +++ b/vrobbler/apps/scrobbles/views.py @@ -375,7 +375,12 @@ def gps_webhook(request): json_data = json.dumps(data_dict, indent=4) logger.debug(f"{json_data}") - scrobble = gpslogger_scrobble_location(data_dict, request.user.id) + # TODO Fix this so we have to authenticate! + user_id = 1 + if request.user.id: + user_id = request.user.id + + scrobble = gpslogger_scrobble_location(data_dict, user_id) if not scrobble: return Response({}, status=status.HTTP_200_OK)