Remove API key From Console

master
Sebastian Serfling 2023-11-01 09:03:49 +01:00
parent d8e466451c
commit 753f1e7dc1
2 changed files with 8 additions and 2 deletions

View File

@ -173,4 +173,10 @@ class CL_ADD_GROUP_VOLUME(BaseModel):
path: str
letter: str
group: str
dbname: str
dbname: str
class CL_ERROR_LOG(BaseModel):
datum: str
hostname: str
samaccountname: str
errorcode: str

View File

@ -296,7 +296,7 @@ async def get_addreport_group(get: CL.CL_ADD_REPORT_GROUP,api_key: APIKey = Depe
return f"Create {get.query} - {get.dbname}"
@app.post("/report/errolog")
async def get_errorlog(get: CL.CL_ADD_REPORT_GROUP,api_key: APIKey = Depends(auth.get_api_key)):
async def get_errorlog(get: CL.CL_ERROR_LOG,api_key: APIKey = Depends(auth.get_api_key)):
print(database(f"INSERT INTO {get.dname}.ERROR_LOG (datum,hostname,samaccouuntname,fehlercode) VALUES ({get.datum},{get.hostname},{get.user},{get.errocode})","",""))
return f"ADD {get.errocode} - {get.hostname}"