修复丢失的api;重新规划api结构

This commit is contained in:
2026-01-22 18:15:53 +08:00
parent 0d139f96f8
commit d21966e985
14 changed files with 710 additions and 151 deletions

View File

@@ -17,6 +17,22 @@ async def fastapi_set_quality_properties(network: str, req: Request) -> ChangeSe
props = await req.json()
return set_quality(network, ChangeSet(props))
@router.get("/getemitterschema")
async def fastapi_get_emitter_schema(network: str) -> dict[str, dict[str, Any]]:
return get_emitter_schema(network)
@router.get("/getemitterproperties/")
async def fastapi_get_emitter_properties(network: str, junction: str) -> dict[str, Any]:
return get_emitter(network, junction)
@router.post("/setemitterproperties/", response_model=None)
async def fastapi_set_emitter_properties(
network: str, junction: str, req: Request
) -> ChangeSet:
props = await req.json()
ps = {"junction": junction} | props
return set_emitter(network, ChangeSet(ps))
@router.get("/getsourcechema/")
async def fastapi_get_source_schema(network: str) -> dict[str, dict[str, Any]]:
return get_source_schema(network)