Change int to double for x,y
This commit is contained in:
4
main.py
4
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
|
||||
|
||||
Reference in New Issue
Block a user