mobixconsulting commited on
Commit
0956b4f
1 Parent(s): 9cd6077

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
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"}