send otp in response for test

This commit is contained in:
Parsa Nazer
2024-12-25 23:37:14 +03:30
parent f0840665cf
commit 1878fe5736
+2 -1
View File
@@ -56,7 +56,8 @@ class SendOTPView(APIView):
if response['statusCode'] == 200:
return Response({'detail': 'OTP sent successfully'}, status=status.HTTP_200_OK)
else:
return Response({'detail': response}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
print('remmber to remove #TODO')
return Response({'detail': response, 'otp_code': otp}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
except User.DoesNotExist:
return Response({'detail': 'user not found'}, status=status.HTTP_404_NOT_FOUND)