DmitrMakeev
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -745,6 +745,13 @@ def send_request():
|
|
745 |
else:
|
746 |
return jsonify({'error': 'Failed to fetch data from the API'}), response.status_code
|
747 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
748 |
@app.route('/send_get_request', methods=['GET'])
|
749 |
def send_get_request():
|
750 |
token = request.args.get('token')
|
@@ -755,7 +762,8 @@ def send_get_request():
|
|
755 |
|
756 |
if response.status_code == 200:
|
757 |
data = response.json()
|
758 |
-
|
|
|
759 |
else:
|
760 |
return jsonify({'error': 'Failed to fetch data from the API'}), response.status_code
|
761 |
|
@@ -776,6 +784,24 @@ def send_get_request():
|
|
776 |
|
777 |
|
778 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
779 |
|
780 |
|
781 |
|
|
|
745 |
else:
|
746 |
return jsonify({'error': 'Failed to fetch data from the API'}), response.status_code
|
747 |
|
748 |
+
|
749 |
+
|
750 |
+
|
751 |
+
|
752 |
+
|
753 |
+
|
754 |
+
|
755 |
@app.route('/send_get_request', methods=['GET'])
|
756 |
def send_get_request():
|
757 |
token = request.args.get('token')
|
|
|
762 |
|
763 |
if response.status_code == 200:
|
764 |
data = response.json()
|
765 |
+
report = data.get('report', {}) # Извлекаем содержимое параметра "report"
|
766 |
+
return jsonify(report) # Возвращаем только содержимое "report"
|
767 |
else:
|
768 |
return jsonify({'error': 'Failed to fetch data from the API'}), response.status_code
|
769 |
|
|
|
784 |
|
785 |
|
786 |
|
787 |
+
|
788 |
+
|
789 |
+
|
790 |
+
|
791 |
+
|
792 |
+
|
793 |
+
|
794 |
+
|
795 |
+
|
796 |
+
|
797 |
+
|
798 |
+
|
799 |
+
|
800 |
+
|
801 |
+
|
802 |
+
|
803 |
+
|
804 |
+
|
805 |
|
806 |
|
807 |
|