Remove API key From Console
parent
000fcd6679
commit
cc1c1c37bf
|
|
@ -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):
|
||||
|
|
|
|||
2
main.py
2
main.py
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue