update message otp
This commit is contained in:
@@ -39,7 +39,8 @@ class SendOTPView(APIView):
|
||||
try:
|
||||
user, created = User.objects.get_or_create(phone=phone)
|
||||
otp = user.set_otp()
|
||||
message = f"کد یک بار مصرف : {otp}"
|
||||
message = f"""به فروشگاه هی ملز خوش اومدی!!❤️🤖
|
||||
کد یک بار مصرف شما : {otp}"""
|
||||
|
||||
|
||||
sms_api = ghasedak_sms.Ghasedak(api_key="1227eaaddcba72bcb0169b37032cf16ae9ac6ed8b3b7c2768b74e2ee351d1b52gyRe3AGomZRPTNEd")
|
||||
@@ -63,9 +64,7 @@ class SendOTPView(APIView):
|
||||
if response['statusCode'] == 200:
|
||||
return Response({'detail': 'OTP sent successfully'}, status=status.HTTP_200_OK)
|
||||
else:
|
||||
print('remmber to remove #TODO')
|
||||
print(response)
|
||||
return Response({'detail': f'OTP sent successfully {otp}'}, status=status.HTTP_200_OK)
|
||||
return Response({'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