Remove API key From Console
parent
f6c538ce46
commit
f6120e361d
2
main.py
2
main.py
|
|
@ -116,7 +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