Update app.py
Browse files
app.py
CHANGED
|
@@ -1709,38 +1709,42 @@ def add_or_update_contact(contact_data):
|
|
| 1709 |
|
| 1710 |
@app.route('/add_data_ver', methods=['GET'])
|
| 1711 |
def add_data_ver():
|
| 1712 |
-
#
|
| 1713 |
contact_data = {
|
| 1714 |
'name': request.args.get('name', ''),
|
| 1715 |
'phone': request.args.get('phone', ''),
|
| 1716 |
'email': request.args.get('email', ''),
|
| 1717 |
-
'
|
| 1718 |
-
'
|
| 1719 |
-
'
|
| 1720 |
-
'
|
| 1721 |
-
'
|
| 1722 |
-
'
|
| 1723 |
-
'
|
| 1724 |
-
'
|
| 1725 |
-
'
|
| 1726 |
-
'
|
| 1727 |
-
'
|
| 1728 |
-
'
|
| 1729 |
-
'
|
| 1730 |
-
'
|
| 1731 |
-
'
|
| 1732 |
-
'
|
| 1733 |
-
'
|
| 1734 |
-
'
|
| 1735 |
-
'
|
| 1736 |
-
'
|
| 1737 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1738 |
}
|
| 1739 |
|
| 1740 |
-
#
|
| 1741 |
phone_verification_response = verify_phone_number(contact_data['phone'])
|
| 1742 |
if phone_verification_response is not None:
|
| 1743 |
-
contact_data['ws_st'] = phone_verification_response #
|
| 1744 |
|
| 1745 |
try:
|
| 1746 |
add_or_update_contact(contact_data)
|
|
@@ -1763,7 +1767,6 @@ def add_data_ver():
|
|
| 1763 |
|
| 1764 |
|
| 1765 |
|
| 1766 |
-
|
| 1767 |
initialize_requests()
|
| 1768 |
|
| 1769 |
|
|
|
|
| 1709 |
|
| 1710 |
@app.route('/add_data_ver', methods=['GET'])
|
| 1711 |
def add_data_ver():
|
| 1712 |
+
# Извлечение параметров запроса с дефолтными значениями пустой строки
|
| 1713 |
contact_data = {
|
| 1714 |
'name': request.args.get('name', ''),
|
| 1715 |
'phone': request.args.get('phone', ''),
|
| 1716 |
'email': request.args.get('email', ''),
|
| 1717 |
+
'vk_id': request.args.get('vk_id', ''),
|
| 1718 |
+
'chat_id': request.args.get('chat_id', ''),
|
| 1719 |
+
'ws_st': request.args.get('ws_st', ''),
|
| 1720 |
+
'ws_stop': request.args.get('ws_stop', ''),
|
| 1721 |
+
'web_st': request.args.get('web_st', ''),
|
| 1722 |
+
'fin_prog': request.args.get('fin_prog', ''),
|
| 1723 |
+
'b_city': request.args.get('b_city', ''),
|
| 1724 |
+
'b_fin': request.args.get('b_fin', ''),
|
| 1725 |
+
'b_ban': request.args.get('b_ban', ''),
|
| 1726 |
+
'b_ign': request.args.get('b_ign', ''),
|
| 1727 |
+
'b_baners': request.args.get('b_baners', ''),
|
| 1728 |
+
'b_butt': request.args.get('b_butt', ''),
|
| 1729 |
+
'b_mess': request.args.get('b_mess', ''),
|
| 1730 |
+
'shop_st': request.args.get('shop_st', ''),
|
| 1731 |
+
'curator': request.args.get('curator', ''),
|
| 1732 |
+
'pr1': request.args.get('pr1', ''),
|
| 1733 |
+
'pr2': request.args.get('pr2', ''),
|
| 1734 |
+
'pr3': request.args.get('pr3', ''),
|
| 1735 |
+
'pr4': request.args.get('pr4', ''),
|
| 1736 |
+
'pr5': request.args.get('pr5', ''),
|
| 1737 |
+
'ad_url': request.args.get('ad_url', ''),
|
| 1738 |
+
'key_pr': request.args.get('key_pr', ''),
|
| 1739 |
+
'n_con': request.args.get('n_con', ''),
|
| 1740 |
+
'canal': request.args.get('canal', ''),
|
| 1741 |
+
'data_t': request.args.get('data_t', '')
|
| 1742 |
}
|
| 1743 |
|
| 1744 |
+
# Получение значения проверки номера телефона
|
| 1745 |
phone_verification_response = verify_phone_number(contact_data['phone'])
|
| 1746 |
if phone_verification_response is not None:
|
| 1747 |
+
contact_data['ws_st'] = phone_verification_response # Сохраняем значение в поле ws_st
|
| 1748 |
|
| 1749 |
try:
|
| 1750 |
add_or_update_contact(contact_data)
|
|
|
|
| 1767 |
|
| 1768 |
|
| 1769 |
|
|
|
|
| 1770 |
initialize_requests()
|
| 1771 |
|
| 1772 |
|