Remove API key From Console

master
Sebastian Serfling 2023-10-12 12:58:14 +02:00
parent 307b06d59a
commit 3a84aa14b9
1 changed files with 2 additions and 2 deletions

View File

@ -86,7 +86,7 @@ async def getuser(get: CL.CL_GET_USER,api_key: APIKey = Depends(auth.get_api_key
else:
return result[0][0]
@app.post("/info/gethostname")
@app.post("/info/gethost")
async def gethostname(get: CL.CL_GET_HOSTNAME,api_key: APIKey = Depends(auth.get_api_key)):
result = database(f"SELECT hostname FROM `hardware` where `hostname` = '{get.hostname}'",f"{get.dbname}","")
if not result:
@ -94,7 +94,7 @@ async def gethostname(get: CL.CL_GET_HOSTNAME,api_key: APIKey = Depends(auth.get
else:
return result[0][0]
@app.post("/info/sethostname")
@app.post("/info/sethost")
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})","","")
if not result: