Remove API key From Console
parent
fcf0814fdd
commit
58e577358d
2
main.py
2
main.py
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue