DmitrMakeev
commited on
Commit
•
6696607
1
Parent(s):
9142d0c
Update app.py
Browse files
app.py
CHANGED
@@ -1632,13 +1632,12 @@ mapping_template_cur = {
|
|
1632 |
}
|
1633 |
|
1634 |
DATABASE_NAME3 = 'data_gc.db'
|
1635 |
-
def verify_phone_number(phone_number):
|
1636 |
|
|
|
|
|
1637 |
print(f"verifikation_start: {verifikation_start}")
|
1638 |
|
1639 |
if verifikation_start == "1":
|
1640 |
-
|
1641 |
-
|
1642 |
full_url_ver = f"{wa_url}{wa_ak}{ws_url_ver}{wa_api_key}"
|
1643 |
print(f"Full URL: {full_url_ver}")
|
1644 |
|
@@ -1674,6 +1673,7 @@ def verify_phone_number(phone_number):
|
|
1674 |
else:
|
1675 |
print("Verification not started")
|
1676 |
return "false" # Возвращаем значение, что WhatsApp не существует
|
|
|
1677 |
def add_or_update_contact(contact_data):
|
1678 |
conn = sqlite3.connect(DATABASE_NAME3)
|
1679 |
cursor = conn.cursor()
|
@@ -1727,7 +1727,7 @@ def add_data_ver_cur():
|
|
1727 |
|
1728 |
try:
|
1729 |
# Добавляем пользователя в базу данных
|
1730 |
-
|
1731 |
current_curator_index = (current_curator_index + 1) % len(curators)
|
1732 |
return jsonify({'status': 'success', 'message': f'User added with curator {user_data["curator"]}'})
|
1733 |
except Exception as e:
|
@@ -1744,7 +1744,6 @@ def add_data_ver_cur():
|
|
1744 |
|
1745 |
|
1746 |
|
1747 |
-
|
1748 |
initialize_requests()
|
1749 |
|
1750 |
|
|
|
1632 |
}
|
1633 |
|
1634 |
DATABASE_NAME3 = 'data_gc.db'
|
|
|
1635 |
|
1636 |
+
|
1637 |
+
def verify_phone_number(phone_number):
|
1638 |
print(f"verifikation_start: {verifikation_start}")
|
1639 |
|
1640 |
if verifikation_start == "1":
|
|
|
|
|
1641 |
full_url_ver = f"{wa_url}{wa_ak}{ws_url_ver}{wa_api_key}"
|
1642 |
print(f"Full URL: {full_url_ver}")
|
1643 |
|
|
|
1673 |
else:
|
1674 |
print("Verification not started")
|
1675 |
return "false" # Возвращаем значение, что WhatsApp не существует
|
1676 |
+
|
1677 |
def add_or_update_contact(contact_data):
|
1678 |
conn = sqlite3.connect(DATABASE_NAME3)
|
1679 |
cursor = conn.cursor()
|
|
|
1727 |
|
1728 |
try:
|
1729 |
# Добавляем пользователя в базу данных
|
1730 |
+
add_or_update_contact(user_data)
|
1731 |
current_curator_index = (current_curator_index + 1) % len(curators)
|
1732 |
return jsonify({'status': 'success', 'message': f'User added with curator {user_data["curator"]}'})
|
1733 |
except Exception as e:
|
|
|
1744 |
|
1745 |
|
1746 |
|
|
|
1747 |
initialize_requests()
|
1748 |
|
1749 |
|