From 2b9ae59e0f65d7376bc70366efb7d535f0177cca Mon Sep 17 00:00:00 2001 From: Sebastian Serfling Date: Wed, 25 Oct 2023 10:13:36 +0200 Subject: [PATCH] Remove API key From Console --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 92a9f41..969f85b 100644 --- a/main.py +++ b/main.py @@ -160,11 +160,11 @@ async def set_user(get: CL.CL_SET_HOST_USER,api_key: APIKey = Depends(auth.get_a @app.post("/user/get") 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'","","") if not result: return False else: - return result[0][0] + return result @app.post("/user/set/lastlogon") async def set_lastlogon_user(get: CL.CL_SET_LASTLOGON_USER,api_key: APIKey = Depends(auth.get_api_key)):