Remove API key From Console
parent
f1b046645f
commit
e671c58a47
2
main.py
2
main.py
|
|
@ -117,7 +117,7 @@ async def getdatabase(get: CL.CL_GET_DATABASE,api_key: APIKey = Depends(auth.get
|
|||
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}')","","")
|
||||
result = database(
|
||||
f"SELECT id FROM `{get.dbname}`.Clients WHERE hostname = '{get.hostname}')",
|
||||
f"SELECT id FROM `{get.dbname}`.Clients WHERE `Host-Name` = '{get.hostname}')",
|
||||
"", "")
|
||||
if not result:
|
||||
return False
|
||||
|
|
|
|||
Loading…
Reference in New Issue