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