This commit is contained in:
DingZQ
2023-05-15 10:48:05 +08:00
parent 19ed81e2b5
commit ee56ad7410

View File

@@ -1572,7 +1572,14 @@ async def fastapi_delete_region(network: str, req: Request) -> ChangeSet:
# district_metering_area 33
############################################################
@app.get('/calculatedistrictmeteringareafornodes/')
async def fastapi_calculate_district_metering_area_for_nodes(network: str, nodes: list[str], part_count: int, part_type: int) -> list[list[str]]:
async def fastapi_calculate_district_metering_area_for_nodes(network: str, req: Request) -> list[list[str]]:
props = await req.json()
nodes = props['nodes']
print(nodes)
part_count = props['part_count']
print(part_count)
part_type = props['part_type']
print(part_type)
return calculate_district_metering_area_for_nodes(network, nodes, part_count, part_type)
@app.get('/calculatedistrictmeteringareaforregion/')