Remove API key From Console

This commit is contained in:
2023-10-12 13:40:31 +02:00
parent 000fcd6679
commit cc1c1c37bf
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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):
+1 -1
View File
@@ -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: