Remove API key From Console

master
Sebastian Serfling 2023-10-12 13:10:34 +02:00
parent 3a80d3a87c
commit a095c07292
2 changed files with 1 additions and 2 deletions

View File

@ -105,7 +105,6 @@ class CL_SET_HOSTNAME(BaseModel):
hostname: str
dbname: str
ram: int
user: str
hddfree: str
hddused: str
hddtotal: str

View File

@ -96,7 +96,7 @@ async def gethostname(get: CL.CL_GET_HOSTNAME,api_key: APIKey = Depends(auth.get
@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}')","","")
result = database(f"INSERT INTO `{get.dbname}`.hardware (hostname,ipadresse,ram,hddused,hddfree,hddtotal) VALUES ('{get.hostname}','{get.ipadresse}','{get.ram}','{get.hddused}','{get.hddfree}','{get.hddtotal}')","","")
if not result:
return False
else: