DmitrMakeev
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1628,11 +1628,15 @@ def gc_forms():
|
|
1628 |
|
1629 |
DATABASE_NAME3 = 'data_gc.db'
|
1630 |
def verify_phone_number(phone_number):
|
1631 |
-
verifikation_start = "1"
|
1632 |
print(f"verifikation_start: {verifikation_start}")
|
1633 |
|
1634 |
if verifikation_start == "1":
|
1635 |
-
|
|
|
|
|
|
|
|
|
1636 |
|
1637 |
full_url_ver = f"{wa_url}{wa_ak}{ws_url_ver}{wa_api_key}"
|
1638 |
print(f"Full URL: {full_url_ver}")
|
@@ -1668,7 +1672,7 @@ def verify_phone_number(phone_number):
|
|
1668 |
return "Error"
|
1669 |
else:
|
1670 |
print("Verification not started")
|
1671 |
-
return "
|
1672 |
def add_or_update_contact(contact_data):
|
1673 |
conn = sqlite3.connect(DATABASE_NAME3)
|
1674 |
cursor = conn.cursor()
|
|
|
1628 |
|
1629 |
DATABASE_NAME3 = 'data_gc.db'
|
1630 |
def verify_phone_number(phone_number):
|
1631 |
+
verifikation_start = "1" # Это значение должно быть получено из конфигурации или передано в функцию
|
1632 |
print(f"verifikation_start: {verifikation_start}")
|
1633 |
|
1634 |
if verifikation_start == "1":
|
1635 |
+
# Переменные окружения для сборки URL
|
1636 |
+
wa_url = "https://api.green-api.com/waInstance"
|
1637 |
+
wa_ak = "1101952913"
|
1638 |
+
ws_url_ver = "/checkWhatsapp/"
|
1639 |
+
wa_api_key = "fb4986a9d9cb40ef9be6c7b08cb9c98b7a3b1dc8c6834b0b92"
|
1640 |
|
1641 |
full_url_ver = f"{wa_url}{wa_ak}{ws_url_ver}{wa_api_key}"
|
1642 |
print(f"Full URL: {full_url_ver}")
|
|
|
1672 |
return "Error"
|
1673 |
else:
|
1674 |
print("Verification not started")
|
1675 |
+
return "false" # Возвращаем значение, что WhatsApp не существует
|
1676 |
def add_or_update_contact(contact_data):
|
1677 |
conn = sqlite3.connect(DATABASE_NAME3)
|
1678 |
cursor = conn.cursor()
|