From 45d977f6685d22c3edadcca5f79eb189cc8be490 Mon Sep 17 00:00:00 2001 From: DmitriyAntonov Date: Mon, 4 Dec 2023 18:25:17 +0400 Subject: [PATCH] antonov_dmitry_lab3_done --- antonov_dmitry_lab_3/service_b/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/antonov_dmitry_lab_3/service_b/app.py b/antonov_dmitry_lab_3/service_b/app.py index 8f306f9..e4954f3 100644 --- a/antonov_dmitry_lab_3/service_b/app.py +++ b/antonov_dmitry_lab_3/service_b/app.py @@ -51,7 +51,7 @@ def update_patient(id): if patient['id'] == id: patient.update(request.json) # отправляем запрос другому сервису - response = requests.put(f"{doctor_service_url}/doctors/1/patients/{id}", json=request.json) + requests.put(f"{doctor_service_url}/doctors/1/patients/{id}", json=request.json) return jsonify(patient), 200 return jsonify({'error': 'Пациент не найден'}), 404 @@ -59,7 +59,7 @@ def update_patient(id): @app.route('/patients/', methods=['DELETE']) def delete_patient(id): # отправляем запрос другому сервису - response = requests.delete(f"{doctor_service_url}/doctors/1/patients/{id}") + requests.delete(f"{doctor_service_url}/doctors/1/patients/{id}") global patients_data patients_data = [patient for patient in patients_data if patient['id'] != id]