Refine method adddistrictmeteringarea

This commit is contained in:
DingZQ
2023-05-26 19:12:05 +08:00
parent 1cf4c40274
commit afeeed6403

View File

@@ -1611,6 +1611,15 @@ async def fastapi_set_district_metering_area(network: str, req: Request) -> Chan
async def fastapi_add_district_metering_area(network: str, req: Request) -> ChangeSet:
props = await req.json()
print(props)
boundary = props['boundary']
newBoundary = []
for pt in boundary:
newBoundary.append((pt[0], pt[1]))
props['boundary'] = newBoundary
print(props)
return add_district_metering_area(network, ChangeSet(props))
@app.post('/deletedistrictmeteringarea/')