diff --git a/main.py b/main.py index 7a00e0b..42f91f0 100644 --- a/main.py +++ b/main.py @@ -86,7 +86,7 @@ async def getuser(get: CL.CL_GET_USER,api_key: APIKey = Depends(auth.get_api_key else: return result[0][0] -@app.post("/info/gethostname") +@app.post("/info/gethost") async def gethostname(get: CL.CL_GET_HOSTNAME,api_key: APIKey = Depends(auth.get_api_key)): result = database(f"SELECT hostname FROM `hardware` where `hostname` = '{get.hostname}'",f"{get.dbname}","") if not result: @@ -94,7 +94,7 @@ async def gethostname(get: CL.CL_GET_HOSTNAME,api_key: APIKey = Depends(auth.get else: return result[0][0] -@app.post("/info/sethostname") +@app.post("/info/sethost") async def sethostname(get: CL.CL_SET_HOSTNAME,api_key: APIKey = Depends(auth.get_api_key)): result = database(f"INSERT INTO `{get.dbname}`.hardware (hostname,ipadresse,user,ram,hddused,hddfree,hddtotal) VALUES ({get.hostname},{get.ipadresse},{get.user},{get.ram}),{get.hddused},{get.hddfree},{get.hddtotal})","","") if not result: