This commit is contained in:
DingZQ
2025-03-28 19:58:47 +08:00
parent e0b6183ff0
commit e90a7b205f
4 changed files with 75 additions and 1 deletions

31
main.py
View File

@@ -2041,6 +2041,37 @@ async def fastapi_get_all_scada_info(network: str) -> list[dict[str, float]]:
return get_all_scada_info(network)
###########################################################
# user 39
###########################################################
@app.get('/getuserschema/')
async def fastapi_get_user_schema(network: str) -> dict[str, dict[str, Any]]:
return get_user_schema(network)
@app.get('/getuser/')
async def fastapi_get_user(network: str, user_name: str) -> dict[str, float]:
return get_user(network, user_name)
@app.get('/getallusers/')
async def fastapi_get_all_users(network: str) -> list[dict[str, float]]:
return get_all_users(network)
# inp file
@app.post("/uploadinp/", status_code=status.HTTP_200_OK)
async def fastapi_upload_inp(afile: bytes, name: str ):