ADD /report
parent
6f25ef191b
commit
4d479cdf34
|
|
@ -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
|
||||
errorcode: str
|
||||
|
||||
class CL_REPORTING(BaseModel):
|
||||
user: str
|
||||
lastaccess: str
|
||||
5
main.py
5
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")
|
||||
Loading…
Reference in New Issue