Skip to content

Commit 544fe1e

Browse files
committed
changed the ID to name
1 parent f60ac4e commit 544fe1e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/entity_graph_api/routers/entity_graph.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ async def export_graph():
6969

7070

7171
@router.get("/list-relations-for-entity")
72-
async def list_relations_for_entity(entity_id: str):
72+
async def list_relations_for_entity(entity_name: str):
7373
"""List all relations for a specific entity."""
7474
try:
75-
relations = extractor.entities_graph_manager.find_entity(entity_id).relations
76-
return {"entity_id": entity_id, "relations": relations}
75+
relations = extractor.entities_graph_manager.find_entity(entity_name).relations
76+
return {"entity_name": entity_name, "relations": relations}
7777
except Exception as e:
7878
raise HTTPException(status_code=500, detail=f"Failed to list relations for entity: {e}")
7979

0 commit comments

Comments
 (0)