Remove API key From Console

master
Sebastian Serfling 2023-10-25 10:58:15 +02:00
parent 58e577358d
commit 8dcc2aff41
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,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}`.Clients SET Username = '{get.user}',`IP-Adresse` = '{get.ipadresse}',`Windows-Version` = '{get.winver}',`CPU-Name` = {get.cpuname}',`Prozessor-Anzahl` = {get.cores},RAM = {get.ram},Speichergesamt = '{get.hddtotal}',Speicherfrei = '{get.hddfree}',Speicherbelegt = '{get.hddused}', LastChange = {datetime.now()} WHERE hostname = '{get.hostname}'","","")
database(f"UPDATE `{get.dbname}`.Clients SET Username = '{get.user}',`IP-Adresse` = '{get.ipadresse}',`Windows-Version` = '{get.winver}',`CPU-Name` = '{get.cpuname}',`Prozessor-Anzahl` = {get.cores},RAM = {get.ram},Speichergesamt = '{get.hddtotal}',Speicherfrei = '{get.hddfree}',Speicherbelegt = '{get.hddused}', LastChange = {datetime.now()} WHERE hostname = '{get.hostname}'","","")
result = database(f"SELECT id FROM `{get.dbname}`.Clients WHERE `Host-Name` = '{get.hostname}'","", "")
if not result:
return False