Spaces:
Sleeping
Sleeping
mobixconsulting
commited on
Commit
•
0956b4f
1
Parent(s):
9cd6077
Update main.py
Browse files
main.py
CHANGED
@@ -15,9 +15,9 @@ async def get_eatc_headers(eatc_code: str = Query(..., description="EATC code to
|
|
15 |
if response.status_code == 200:
|
16 |
response_json = json.loads(response.text)
|
17 |
if len(response_json) >= 2 and "res" in response_json and response_json["res"]:
|
18 |
-
report = f"REPORTE DE AUDITORIA PARA = {response_json['res'][0]['eatc-code']}\n"
|
19 |
-
report += f'"eatc_code":"{response_json["res"][0]["eatc-code"]}"\n'
|
20 |
-
report += f'"eatc_match_asignation_rule":"{response_json["res"][0].get("eatc_match_asignation_rule", "")}"'
|
21 |
return {"report": report}
|
22 |
else:
|
23 |
return {"error": "Invalid response from API"}
|
|
|
15 |
if response.status_code == 200:
|
16 |
response_json = json.loads(response.text)
|
17 |
if len(response_json) >= 2 and "res" in response_json and response_json["res"]:
|
18 |
+
report = f"REPORTE DE AUDITORIA PARA = {response_json['res'][0]['eatc-code']}\n\n"
|
19 |
+
report += f'"eatc_code": "{response_json["res"][0]["eatc-code"]}"\n\n'
|
20 |
+
report += f'"eatc_match_asignation_rule": "{response_json["res"][0].get("eatc_match_asignation_rule", "")}"'
|
21 |
return {"report": report}
|
22 |
else:
|
23 |
return {"error": "Invalid response from API"}
|