diff --git a/main.py b/main.py index 5230c4f..d50971e 100644 --- a/main.py +++ b/main.py @@ -117,12 +117,16 @@ async def fastapi_count_node(network: str): @app.get("/getnodecoord/") async def fastapi_get_node_coord(network: str, node: str): - pt = [] value = get_node_coord(network, node).value - pt.append(value.x) - pt.append(value.y) - return pt + return JSONResponse( + status_code = status.HTTP_200_OK, + content = + { + 'x': value.x, + 'y': value.y + } + ) @app.post("/setnodecoord/") async def fastapi_set_node_coord(network: str, node: str, x: int, y: int):