Update app.py
Browse files
app.py
CHANGED
@@ -825,14 +825,16 @@ def send_get_request():
|
|
825 |
if response.status_code == 200:
|
826 |
data = response.json()
|
827 |
|
828 |
-
|
829 |
-
|
830 |
|
|
|
831 |
try:
|
832 |
report_json = json.loads(report_json_str)
|
833 |
except json.JSONDecodeError:
|
834 |
report_json = {}
|
835 |
|
|
|
836 |
try:
|
837 |
messages_json = json.loads(messages_json_str)
|
838 |
except json.JSONDecodeError:
|
@@ -877,6 +879,7 @@ def send_get_request():
|
|
877 |
|
878 |
|
879 |
|
|
|
880 |
|
881 |
|
882 |
@app.route('/biz_v', methods=['GET'])
|
|
|
825 |
if response.status_code == 200:
|
826 |
data = response.json()
|
827 |
|
828 |
+
report = data.get('report', {})
|
829 |
+
messages = data.get('messages', {})
|
830 |
|
831 |
+
report_json_str = report.get('report', '{}')
|
832 |
try:
|
833 |
report_json = json.loads(report_json_str)
|
834 |
except json.JSONDecodeError:
|
835 |
report_json = {}
|
836 |
|
837 |
+
messages_json_str = messages.get('messages', '{}')
|
838 |
try:
|
839 |
messages_json = json.loads(messages_json_str)
|
840 |
except json.JSONDecodeError:
|
|
|
879 |
|
880 |
|
881 |
|
882 |
+
|
883 |
|
884 |
|
885 |
@app.route('/biz_v', methods=['GET'])
|