Remove API key From Console
parent
e516cc989b
commit
d1d0e3ebb0
|
|
@ -52,7 +52,8 @@ class CL_GET_AD_GROUP_USER(BaseModel):
|
|||
query: str
|
||||
dbname: str
|
||||
|
||||
class CL_GET_AD_GROUP(BaseModel):
|
||||
class CL_GET_REPORT_GROUP(BaseModel):
|
||||
group_name: str
|
||||
dbname: str
|
||||
|
||||
class CL_ADD_REPORT_GROUP(BaseModel):
|
||||
|
|
|
|||
4
main.py
4
main.py
|
|
@ -150,8 +150,8 @@ async def add_report_user(get: CL.CL_ADD_REPORT_USER,api_key: APIKey = Depends(a
|
|||
return f"Create {get.query} - {get.dbname}"
|
||||
|
||||
@app.post("/report/getgroup")
|
||||
async def get_report_group(get: CL.CL_GET_AD_GROUP,api_key: APIKey = Depends(auth.get_api_key)):
|
||||
result = database(f"SELECT ID, Name FROM `{get.dbname}`.`Gruppen`","","")
|
||||
async def get_report_group(get: CL.CL_GET_REPORT_GROUP,api_key: APIKey = Depends(auth.get_api_key)):
|
||||
result = database(f"SELECT {get.group_name} FROM `{get.dbname}`.`Gruppen`","","")
|
||||
if not result:
|
||||
return False
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in New Issue