Remove API key From Console
parent
3f55e0dc22
commit
f6c538ce46
4
main.py
4
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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue