From ff92e28b9711765457bb072954a5a9a6eb2196bd Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Tue, 22 Oct 2024 10:01:29 +0200 Subject: [PATCH] remove quotas in string of token --- api/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/views.py b/api/views.py index 69da2a2..7ea8a76 100644 --- a/api/views.py +++ b/api/views.py @@ -33,7 +33,7 @@ def NewSnapshot(request): if not auth_header or not auth_header.startswith('Bearer '): return JsonResponse({'error': 'Invalid or missing token'}, status=401) - token = auth_header.split(' ')[1] + token = auth_header.split(' ')[1].strip("'") tk = Token.objects.filter(token=token).first() if not tk: return JsonResponse({'error': 'Invalid or missing token'}, status=401)