Remove API key From Console
parent
54cc673517
commit
b595d7aa1c
2
main.py
2
main.py
|
|
@ -88,7 +88,7 @@ async def getuser(get: CL.CL_GET_USER,api_key: APIKey = Depends(auth.get_api_key
|
||||||
|
|
||||||
@app.post("/host/get")
|
@app.post("/host/get")
|
||||||
async def gethost(get: CL.CL_GET_HOST,api_key: APIKey = Depends(auth.get_api_key)):
|
async def gethost(get: CL.CL_GET_HOST,api_key: APIKey = Depends(auth.get_api_key)):
|
||||||
result = database(f"SELECT id FROM `hardware` where `hostname` = '{get.hostname}'",f"{get.dbname}","")
|
result = database(f"SELECT id FROM `clients` where `hostname` = '{get.hostname}'",f"{get.dbname}","")
|
||||||
if not result:
|
if not result:
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue