From 98b2a2e368a67c6f35ea80c85faee9a90aca587f Mon Sep 17 00:00:00 2001 From: emile Date: Fri, 5 Apr 2024 22:13:37 +0300 Subject: [PATCH] new --- osinaweb/osinacore/api/views.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/osinaweb/osinacore/api/views.py b/osinaweb/osinacore/api/views.py index 726e5455..5b3b68bf 100644 --- a/osinaweb/osinacore/api/views.py +++ b/osinaweb/osinacore/api/views.py @@ -34,12 +34,6 @@ def authenticate_customer(request): user = authenticate(request, email=email, password=password) if user is not None: login(request, user) - response = JsonResponse({'success': True}) + return JsonResponse({'success': True}) else: - response = JsonResponse({'success': False, 'error': 'Invalid credentials'}) - - response["Access-Control-Allow-Origin"] = "https://osimenu.com" - response["Access-Control-Allow-Methods"] = "POST" - response["Access-Control-Allow-Headers"] = "Content-Type" - - return response + return JsonResponse({'success': False, 'error': 'Invalid credentials'}) \ No newline at end of file