Remove API key From Console
parent
3a80d3a87c
commit
a095c07292
|
|
@ -105,7 +105,6 @@ class CL_SET_HOSTNAME(BaseModel):
|
||||||
hostname: str
|
hostname: str
|
||||||
dbname: str
|
dbname: str
|
||||||
ram: int
|
ram: int
|
||||||
user: str
|
|
||||||
hddfree: str
|
hddfree: str
|
||||||
hddused: str
|
hddused: str
|
||||||
hddtotal: str
|
hddtotal: str
|
||||||
|
|
|
||||||
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,ram,hddused,hddfree,hddtotal) VALUES ('{get.hostname}','{get.ipadresse}','{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