diff --git a/Classes/main_classes.py b/Classes/main_classes.py index 225f358..659924b 100644 --- a/Classes/main_classes.py +++ b/Classes/main_classes.py @@ -5,7 +5,6 @@ class CL_Ping_Set(BaseModel): name: str ipaddress: str - class CL_Database_get(BaseModel): name: str @@ -179,4 +178,8 @@ class CL_ERROR_LOG(BaseModel): datum: str hostname: str samaccountname: str - errorcode: str \ No newline at end of file + errorcode: str + +class CL_REPORTING(BaseModel): + user: str + lastaccess: str \ No newline at end of file diff --git a/main.py b/main.py index 56a6a1c..e1a41a9 100644 --- a/main.py +++ b/main.py @@ -335,6 +335,11 @@ async def volume_mount(get: CL.CL_GET_VOLUME,api_key: APIKey = Depends(auth.get_ database(f"INSERT INTO `Volume-Mount` (date,user) VALUES ('{get.date}','{get.user}')","Stines-GmbH","") return f"User {get.user} ADD" +@app.posst("/report") +async def reporting(get: CL.CL_REPORTING,api_key: APIKey = Depends(auth.get_api_key)): + print(f"{get.user}") + print(f"{get.lastaccess}") + ## Startet den API-Server if __name__ == '__main__': uvicorn.run("main:app", host='0.0.0.0', port=8001, reload=True, log_level="debug") \ No newline at end of file