Финальная версия
This commit is contained in:
@@ -497,7 +497,7 @@ def request_patient2():
|
||||
taxpayer_status_zapros = data.get('taxpayer_status')
|
||||
patient_fio = data.get('patient_fio')
|
||||
|
||||
url = "http://192.168.1.10:8081/AppFindPacFromTel"
|
||||
url = "http://192.168.1.10:8080/AppFindPacFromTel"
|
||||
data = {"telegram_id": user_id}
|
||||
|
||||
response = requests.post(url, json=data)
|
||||
@@ -532,7 +532,7 @@ def request_patient2():
|
||||
}
|
||||
print(payload)
|
||||
headers = {"User-Agent": "Mozilla/5.0", "Content-Type": "application/json"}
|
||||
url = "http://192.168.1.10:8081/AppZaprSvedPac"
|
||||
url = "http://192.168.1.10:8080/AppZaprSvedPac"
|
||||
response = requests.post(url, json=payload, headers=headers)
|
||||
|
||||
if response.status_code == 200:
|
||||
@@ -743,7 +743,7 @@ def send_registration_request2():
|
||||
# Успешный ответ
|
||||
HEADER2 = {"User-Agent": "Mozilla/5.0", "Content-Type": "application/json"}
|
||||
try:
|
||||
response = requests.post("http://192.168.1.10:8081/AppSaveSvedPac", headers=HEADER2, json=data2, timeout=5)
|
||||
response = requests.post("http://192.168.1.10:8080/AppSaveSvedPac", headers=HEADER2, json=data2, timeout=5)
|
||||
print("Ответ сервера:", response.text) # вдруг сервер всё же что-то вернёт
|
||||
if response.status_code == 200:
|
||||
return jsonify({'success': True})
|
||||
@@ -765,7 +765,7 @@ def main_page_2_0():
|
||||
|
||||
|
||||
|
||||
@webApp.route('/fns')
|
||||
@webApp.route('/fnstest')
|
||||
def main_page_2_0_fns():
|
||||
try:
|
||||
user_id = request.args.get('user_id')
|
||||
@@ -792,14 +792,14 @@ def main_page_2_0_fns():
|
||||
|
||||
|
||||
|
||||
@webApp.route('/fnstest')
|
||||
@webApp.route('/fns')
|
||||
def main_page_2_0_fns_test():
|
||||
try:
|
||||
user_id = request.args.get('user_id')
|
||||
if not user_id:
|
||||
return "Ошибка: не передан user_id", 400
|
||||
|
||||
url = "http://192.168.1.10:8081/AppFindPacFromTel"
|
||||
url = "http://192.168.1.10:8080/AppFindPacFromTel"
|
||||
data = {"telegram_id": user_id}
|
||||
|
||||
response = requests.post(url, json=data)
|
||||
|
||||
Reference in New Issue
Block a user