Remove API key From Console
parent
2a743a0a93
commit
3a80d3a87c
2
main.py
2
main.py
|
|
@ -96,7 +96,7 @@ async def gethostname(get: CL.CL_GET_HOSTNAME,api_key: APIKey = Depends(auth.get
|
||||||
|
|
||||||
@app.post("/info/sethost")
|
@app.post("/info/sethost")
|
||||||
async def sethostname(get: CL.CL_SET_HOSTNAME,api_key: APIKey = Depends(auth.get_api_key)):
|
async def sethostname(get: CL.CL_SET_HOSTNAME,api_key: APIKey = Depends(auth.get_api_key)):
|
||||||
result = database(f"INSERT INTO `{get.dbname}`.hardware (hostname,ipadresse,user,ram,hddused,hddfree,hddtotal) VALUES ({get.hostname},{get.ipadresse},{get.user},{get.ram}),{get.hddused},{get.hddfree},{get.hddtotal})","","")
|
result = database(f"INSERT INTO `{get.dbname}`.hardware (hostname,ipadresse,user,ram,hddused,hddfree,hddtotal) VALUES ('{get.hostname}','{get.ipadresse}','{get.user}','{get.ram}','{get.hddused}','{get.hddfree}','{get.hddtotal}')","","")
|
||||||
if not result:
|
if not result:
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue