otp hash
This commit is contained in:
@@ -28,8 +28,8 @@ class SendOTPView(APIView):
|
||||
user, created = User.objects.get_or_create(phone=phone)
|
||||
print(created)
|
||||
print(user.phone)
|
||||
user.set_otp()
|
||||
message = f"کد یک بار مصرف : {user.otp}"
|
||||
otp = user.set_otp()
|
||||
message = f"کد یک بار مصرف : {otp}"
|
||||
print(message)
|
||||
# send otp
|
||||
return Response({'detail': 'OTP sent successfully'}, status=status.HTTP_200_OK)
|
||||
|
||||
Reference in New Issue
Block a user