Remove API key From Console
parent
ef228cd0a4
commit
106bab6853
5
main.py
5
main.py
|
|
@ -162,10 +162,7 @@ async def set_user(get: CL.CL_SET_HOST_USER,api_key: APIKey = Depends(auth.get_a
|
||||||
async def get_user(get: CL.CL_GET_HOST_USER,api_key: APIKey = Depends(auth.get_api_key)):
|
async def get_user(get: CL.CL_GET_HOST_USER,api_key: APIKey = Depends(auth.get_api_key)):
|
||||||
result = database(f"SELECT id FROM `{get.dbname}`.`Active-Directory-User` WHERE SamAccountName = '{get.user}' ORDER BY ID DESC LIMIT 1","","")
|
result = database(f"SELECT id FROM `{get.dbname}`.`Active-Directory-User` WHERE SamAccountName = '{get.user}' ORDER BY ID DESC LIMIT 1","","")
|
||||||
print(result)
|
print(result)
|
||||||
if not result:
|
return result
|
||||||
return False
|
|
||||||
else:
|
|
||||||
return result
|
|
||||||
|
|
||||||
@app.post("/user/set/lastlogon")
|
@app.post("/user/set/lastlogon")
|
||||||
async def set_lastlogon_user(get: CL.CL_SET_LASTLOGON_USER,api_key: APIKey = Depends(auth.get_api_key)):
|
async def set_lastlogon_user(get: CL.CL_SET_LASTLOGON_USER,api_key: APIKey = Depends(auth.get_api_key)):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue