Remove API key From Console

master
Sebastian Serfling 2023-10-25 10:47:00 +02:00
parent 9254a7449d
commit f1b046645f
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ async def getdatabase(get: CL.CL_GET_DATABASE,api_key: APIKey = Depends(auth.get
@app.post("/host/set") @app.post("/host/set")
async def sethost(get: CL.CL_SET_HOST,api_key: APIKey = Depends(auth.get_api_key)): async def sethost(get: CL.CL_SET_HOST,api_key: APIKey = Depends(auth.get_api_key)):
database(f"INSERT INTO `{get.dbname}`.Clients (Host-Name,Username,IP-Adresse,Windows-Version,CPU-Name,Prozessor-Anzahl,RAM,Speichergesamt,Speicherfrei,Speicherbelegt) VALUES ('{get.hostname}','{get.user}','{get.ipadresse}','{get.winver}','{get.cpuname}','{get.cores}','{get.ram}','{get.hddtotal}','{get.hddfree}','{get.hddused}')","","") database(f"INSERT INTO `{get.dbname}`.Clients (`Host-Name`,Username,`IP-Adresse`,`Windows-Version`,`CPU-Name`,`Prozessor-Anzahl`,RAM,Speichergesamt,Speicherfrei,Speicherbelegt) VALUES ('{get.hostname}','{get.user}','{get.ipadresse}','{get.winver}','{get.cpuname}','{get.cores}','{get.ram}','{get.hddtotal}','{get.hddfree}','{get.hddused}')","","")
result = database( result = database(
f"SELECT id FROM `{get.dbname}`.Clients WHERE hostname = '{get.hostname}')", f"SELECT id FROM `{get.dbname}`.Clients WHERE hostname = '{get.hostname}')",
"", "") "", "")