chagne api key of ghasedak

This commit is contained in:
Parsa Nazer
2025-12-22 13:19:43 +03:30
parent f10090f995
commit 38267a2263
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -41,7 +41,7 @@ class SendOTPView(APIView):
try: try:
user, created = User.objects.get_or_create(phone=phone) user, created = User.objects.get_or_create(phone=phone)
otp = user.set_otp() otp = user.set_otp()
sms_api = ghasedak_sms.Ghasedak(api_key="1227eaaddcba72bcb0169b37032cf16ae9ac6ed8b3b7c2768b74e2ee351d1b52gyRe3AGomZRPTNEd") sms_api = ghasedak_sms.Ghasedak(api_key="8f7396f1e3c39e3a4621009c558d955336eea6d21cf257dd74ae262d6f22a458XdoDjH6egJsiZsy8")
# response = sms_api.send_single_sms( # response = sms_api.send_single_sms(
@@ -74,7 +74,7 @@ class SendOTPView(APIView):
return Response({'detail': f'OTP sent successfully {otp}'}, status=status.HTTP_200_OK) return Response({'detail': f'OTP sent successfully {otp}'}, status=status.HTTP_200_OK)
else: else:
print(response) print(response)
return Response({'detail': f'مشکلی در ارسال کد رخ داد'}, status=status.HTTP_200_OK) return Response({f'detail': f'مشکلی در ارسال کد رخ داد {otp}'}, status=status.HTTP_200_OK)
# return Response({'detail': response, 'otp_code': otp}, status=status.HTTP_500_INTERNAL_SERVER_ERROR) # return Response({'detail': response, 'otp_code': otp}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
except User.DoesNotExist: except User.DoesNotExist:
+1 -1
View File
@@ -46,7 +46,7 @@ def send_change_status_notif(instance_pk, new_status):
@shared_task @shared_task
def send_change_status_sms(instance_pk, new_status): def send_change_status_sms(instance_pk, new_status):
instance = OrderModel.objects.get(pk=instance_pk) instance = OrderModel.objects.get(pk=instance_pk)
sms_api = ghasedak_sms.Ghasedak(api_key="1227eaaddcba72bcb0169b37032cf16ae9ac6ed8b3b7c2768b74e2ee351d1b52gyRe3AGomZRPTNEd") sms_api = ghasedak_sms.Ghasedak(api_key="8f7396f1e3c39e3a4621009c558d955336eea6d21cf257dd74ae262d6f22a458XdoDjH6egJsiZsy8")
response = sms_api.send_single_sms( response = sms_api.send_single_sms(