From f6c538ce46c54b56350fcc6235c4da1fd2ee80ca Mon Sep 17 00:00:00 2001 From: Sebastian Serfling Date: Fri, 13 Oct 2023 12:22:24 +0200 Subject: [PATCH] Remove API key From Console --- main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.py b/main.py index 048bad1..79bf8ad 100644 --- a/main.py +++ b/main.py @@ -116,9 +116,7 @@ async def sethost(get: CL.CL_SET_HOST,api_key: APIKey = Depends(auth.get_api_key @app.post("/host/update") async def updatehost(get: CL.CL_UPDATE_HOST,api_key: APIKey = Depends(auth.get_api_key)): database(f"UPDATE `{get.dbname}`.hardware SET ipadresse = '{get.ipadresse}', ram = '{get.ram}', hddused = '{get.hddused}' ,hddfree = '{get.hddfree}',hddtotal = '{get.hddtotal}' WHERE hostname = '{get.hostname}'","","") - result = database( - f"SELECT id FROM `{get.dbname}`.hardware WHERE hostname = '{get.hostname}')", - "", "") + result = database(f"SELECT id FROM `{get.dbname}`.hardware WHERE hostname = '{get.hostname}')","", "") if not result: return False else: