mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-26 08:34:55 +00:00
Merge pull request #348 from KiwiTechLLC/ZBKBCK-54
fixed login into another device issue
This commit is contained in:
@ -114,6 +114,10 @@ class GoogleLoginMixin(object):
|
|||||||
ERROR_CODE["2069"],
|
ERROR_CODE["2069"],
|
||||||
response_status=status.HTTP_400_BAD_REQUEST
|
response_status=status.HTTP_400_BAD_REQUEST
|
||||||
)
|
)
|
||||||
|
device_detail, created = UserDeviceDetails.objects.get_or_create(user=user_data.last())
|
||||||
|
if device_detail:
|
||||||
|
device_detail.device_id = device_id
|
||||||
|
device_detail.save()
|
||||||
return custom_response(SUCCESS_CODE['3003'], serializer.data,
|
return custom_response(SUCCESS_CODE['3003'], serializer.data,
|
||||||
response_status=status.HTTP_200_OK)
|
response_status=status.HTTP_200_OK)
|
||||||
|
|
||||||
@ -202,6 +206,10 @@ class SigninWithApple(views.APIView):
|
|||||||
ERROR_CODE["2069"],
|
ERROR_CODE["2069"],
|
||||||
response_status=status.HTTP_400_BAD_REQUEST
|
response_status=status.HTTP_400_BAD_REQUEST
|
||||||
)
|
)
|
||||||
|
device_detail, created = UserDeviceDetails.objects.get_or_create(user=user)
|
||||||
|
if device_detail:
|
||||||
|
device_detail.device_id = device_id
|
||||||
|
device_detail.save()
|
||||||
return custom_response(SUCCESS_CODE['3003'], serializer.data,
|
return custom_response(SUCCESS_CODE['3003'], serializer.data,
|
||||||
response_status=status.HTTP_200_OK)
|
response_status=status.HTTP_200_OK)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user