|
|
|
@ -31,7 +31,6 @@ def register_customer(request):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@api_view(['POST'])
|
|
|
|
|
def authenticate_customer(request):
|
|
|
|
|
if request.method == 'POST':
|
|
|
|
@ -40,8 +39,7 @@ def authenticate_customer(request):
|
|
|
|
|
user = User.objects.filter(email=email).first()
|
|
|
|
|
|
|
|
|
|
if user is not None:
|
|
|
|
|
login(request, user)
|
|
|
|
|
redirect_url = 'https://newosina.osinode.com'
|
|
|
|
|
redirect_url = f'https://newosina.osinode.com/login/{email}/'
|
|
|
|
|
return HttpResponseRedirect(redirect_url)
|
|
|
|
|
else:
|
|
|
|
|
return JsonResponse({'success': False, 'error': 'User does not exist'})
|