Refine
This commit is contained in:
3
main.py
3
main.py
@@ -1610,15 +1610,14 @@ async def fastapi_set_district_metering_area(network: str, req: Request) -> Chan
|
||||
@app.post('/adddistrictmeteringarea/')
|
||||
async def fastapi_add_district_metering_area(network: str, req: Request) -> ChangeSet:
|
||||
props = await req.json()
|
||||
print(props)
|
||||
|
||||
# boundary should be [(x,y), (x,y)]
|
||||
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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user