Remove API key From Console
This commit is contained in:
@@ -101,8 +101,8 @@ class CL_GET_HOST(BaseModel):
|
||||
hostname: str
|
||||
dbname: str
|
||||
|
||||
class CL_GET_HOST_USER(BaseModel):
|
||||
hostname: str
|
||||
class CL_SET_HOST_USER(BaseModel):
|
||||
user: str
|
||||
dbname: str
|
||||
|
||||
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")
|
||||
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:
|
||||
return False
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user