security updates
This commit is contained in:
@@ -7,7 +7,6 @@ urlpatterns = [
|
||||
path('profile', views.ProfileView.as_view()),
|
||||
path('verify', views.TokenVerifyView.as_view(), name='jwt-verify'),
|
||||
path('send_otp', views.SendOTPView.as_view(), name='send-otp-view'),
|
||||
path('yee_token_bedeeee', views.KonGhoshadToken.as_view()),
|
||||
path('address/create', views.CreateAddressView.as_view(), name='create-address'),
|
||||
path('address/edit/<int:pk>', views.EditAddressView.as_view(), name='edit-address'),
|
||||
path('address/delete/<int:pk>', views.DeleteAddressView.as_view(), name='delete-address'),
|
||||
|
||||
@@ -71,10 +71,10 @@ class SendOTPView(APIView):
|
||||
|
||||
|
||||
if response['statusCode'] == 200:
|
||||
return Response({'detail': f'OTP sent successfully {otp}'}, status=status.HTTP_200_OK)
|
||||
return Response({'detail': f'OTP sent successfully'}, status=status.HTTP_200_OK)
|
||||
else:
|
||||
print(response)
|
||||
return Response({f'detail': f'مشکلی در ارسال کد رخ داد {otp}'}, status=status.HTTP_200_OK)
|
||||
logger.error(f"OTP send failed with response: {response}")
|
||||
return Response({f'detail': f'مشکلی در ارسال کد رخ داد '}, status=status.HTTP_200_OK)
|
||||
# return Response({'detail': response, 'otp_code': otp}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
|
||||
|
||||
except User.DoesNotExist:
|
||||
|
||||
Reference in New Issue
Block a user