From 910fecf24f16b980ed2e8ea12dae0020f2404c8b Mon Sep 17 00:00:00 2001 From: DingZQ Date: Sat, 3 Sep 2022 19:37:45 +0800 Subject: [PATCH] Change int to double for x,y --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index d50971e..86c5c44 100644 --- a/main.py +++ b/main.py @@ -94,7 +94,7 @@ async def fastapi_add_node(network: str, node: str): return idx @app.post("/addnodewithcoord/") -async def fastapi_add_node_with_coord(network: str, node: str, x: int, y: int): +async def fastapi_add_node_with_coord(network: str, node: str, x: float, y: float): idx = add_node(network, node, JUNCTION) print(idx) count = get_count(network, NODE_COUNT) @@ -129,7 +129,7 @@ async def fastapi_get_node_coord(network: str, node: str): ) @app.post("/setnodecoord/") -async def fastapi_set_node_coord(network: str, node: str, x: int, y: int): +async def fastapi_set_node_coord(network: str, node: str, x: float, y: float): set_node_coord(network, node, x, y) return True