add new api
This commit is contained in:
@@ -11,11 +11,11 @@ from core.services.sms import send_sms_eskiz
|
||||
from core.services.sms_via_bot import send_sms_code
|
||||
|
||||
@shared_task
|
||||
def create_and_send_sms_code(phone):
|
||||
def create_and_send_sms_code(phone, type):
|
||||
verification = VerificationCode.objects.create(
|
||||
code=''.join([str(random.randint(1, 100) % 10) for _ in range(4)]),
|
||||
phone=phone,
|
||||
expiration_time=timezone.now() + timedelta(minutes=2)
|
||||
)
|
||||
# send_sms_eskiz(user.phone, code)
|
||||
send_sms_code(verification.code, 'auth', verification.phone)
|
||||
send_sms_code(verification.code, type, verification.phone)
|
||||
|
||||
Reference in New Issue
Block a user