DmitrMakeev
commited on
Commit
•
537148d
1
Parent(s):
59e03d7
Update app.py
Browse files
app.py
CHANGED
@@ -807,12 +807,15 @@ curator_on_off = "1" # Глобальная переменная для упр
|
|
807 |
current_curator_index = 0
|
808 |
|
809 |
def verify_phone_number_biz(phone_number):
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
|
|
|
|
|
|
814 |
else:
|
815 |
-
return "
|
816 |
|
817 |
def update_or_insert_user_biz(db_name, user_data, mapping_template):
|
818 |
conn = sqlite3.connect(db_name)
|
|
|
807 |
current_curator_index = 0
|
808 |
|
809 |
def verify_phone_number_biz(phone_number):
|
810 |
+
full_url_ver = f"{wa_url}{wa_ak}{ws_url_ver}{wa_api_key}"
|
811 |
+
payload = {"phoneNumber": phone_number}
|
812 |
+
headers = {'Content-Type': 'application/json'}
|
813 |
+
response = requests.post(full_url_ver, headers=headers, json=payload)
|
814 |
+
if response.status_code == 200:
|
815 |
+
response_body = response.json()
|
816 |
+
return response_body.get('existsWhatsapp', 'false')
|
817 |
else:
|
818 |
+
return "Error"
|
819 |
|
820 |
def update_or_insert_user_biz(db_name, user_data, mapping_template):
|
821 |
conn = sqlite3.connect(db_name)
|