Add API getallburstlocateresults
This commit is contained in:
@@ -171,3 +171,5 @@ from .s40_schema import get_scheme_schema, get_scheme, get_all_schemes
|
||||
from .s41_pipe_risk_probability import get_pipe_risk_probability_now, get_pipe_risk_probability, get_network_pipe_risk_probability_now, get_pipes_risk_probability, get_pipe_risk_probability_geometries
|
||||
|
||||
from .s42_sensor_placement import get_all_sensor_placements
|
||||
|
||||
from .s43_burst_locate_result import get_all_burst_locate_results
|
||||
|
||||
6
api/s43_burst_locate_result.py
Normal file
6
api/s43_burst_locate_result.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from .database import *
|
||||
from .s0_base import *
|
||||
import json
|
||||
|
||||
def get_all_burst_locate_results(name: str) -> list[dict[Any, Any]]:
|
||||
return read_all(name, "select * from burst_locate_result")
|
||||
6
main.py
6
main.py
@@ -2245,6 +2245,12 @@ async def fastapi_get_all_sensor_placements(network: str) -> list[dict[Any, Any]
|
||||
return get_all_sensor_placements(network)
|
||||
|
||||
|
||||
############################################################
|
||||
# burst_locate_result 43
|
||||
############################################################
|
||||
@app.get('/getallburstlocateresults/')
|
||||
async def fastapi_get_all_burst_locate_results(network: str) -> list[dict[Any, Any]]:
|
||||
return get_all_burst_locate_results(network)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1338,5 +1338,11 @@ def get_pipe_risk_probability_geometries(name: str) -> dict[str, Any]:
|
||||
def get_all_sensor_placements(name: str) -> list[dict[Any, Any]]:
|
||||
return api.get_all_sensor_placements(name)
|
||||
|
||||
############################################################
|
||||
# burst_locate_result 43
|
||||
############################################################
|
||||
def get_all_burst_locate_results(name: str) -> list[dict[Any, Any]]:
|
||||
return api.get_all_burst_locate_results(name)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user