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")
|
@app.post("/host/update")
|
||||||
async def updatehost(get: CL.CL_UPDATE_HOST,api_key: APIKey = Depends(auth.get_api_key)):
|
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}'","","")
|
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(
|
result = database(f"SELECT id FROM `{get.dbname}`.hardware WHERE hostname = '{get.hostname}')","", "")
|
||||||
f"SELECT id FROM `{get.dbname}`.hardware WHERE hostname = '{get.hostname}')",
|
|
||||||
"", "")
|
|
||||||
if not result:
|
if not result:
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue