Remove API key From Console
This commit is contained in:
@@ -101,8 +101,8 @@ class CL_GET_HOST(BaseModel):
|
|||||||
hostname: str
|
hostname: str
|
||||||
dbname: str
|
dbname: str
|
||||||
|
|
||||||
class CL_GET_HOST_USER(BaseModel):
|
class CL_SET_HOST_USER(BaseModel):
|
||||||
hostname: str
|
user: str
|
||||||
dbname: str
|
dbname: str
|
||||||
|
|
||||||
class CL_GET_HOST_USER(BaseModel):
|
class CL_GET_HOST_USER(BaseModel):
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ async def sethostname(get: CL.CL_SET_HOST,api_key: APIKey = Depends(auth.get_api
|
|||||||
|
|
||||||
@app.post("/info/sethost_user")
|
@app.post("/info/sethost_user")
|
||||||
async def sethost_user(get: CL.CL_SET_HOST_USER,api_key: APIKey = Depends(auth.get_api_key)):
|
async def sethost_user(get: CL.CL_SET_HOST_USER,api_key: APIKey = Depends(auth.get_api_key)):
|
||||||
result = database(f"INSERT INTO `{get.dbname}`.user (lastlogon,user) VALUES ('{get.lastlogon}','{get.user}')","","")
|
result = database(f"INSERT INTO `{get.dbname}`.user (user) VALUES ('{get.user}')","","")
|
||||||
if not result:
|
if not result:
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user