Refine method adddistrictmeteringarea
This commit is contained in:
9
main.py
9
main.py
@@ -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:
|
async def fastapi_add_district_metering_area(network: str, req: Request) -> ChangeSet:
|
||||||
props = await req.json()
|
props = await req.json()
|
||||||
print(props)
|
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))
|
return add_district_metering_area(network, ChangeSet(props))
|
||||||
|
|
||||||
@app.post('/deletedistrictmeteringarea/')
|
@app.post('/deletedistrictmeteringarea/')
|
||||||
|
|||||||
Reference in New Issue
Block a user