ADD /report

master
root 2024-07-29 15:09:56 +02:00
parent ae5b1ed774
commit 56fc7dd565
3 changed files with 6 additions and 3 deletions

View File

@ -3,5 +3,5 @@
<component name="Black">
<option name="sdkName" value="Python 3.9 (api)" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (api)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11" project-jdk-type="Python SDK" />
</project>

View File

@ -182,4 +182,5 @@ class CL_ERROR_LOG(BaseModel):
class CL_REPORTING(BaseModel):
user: str
lastaccess: str
lastaccess: str
ipaddress: str

View File

@ -338,7 +338,9 @@ async def volume_mount(get: CL.CL_GET_VOLUME,api_key: APIKey = Depends(auth.get_
@app.post("/report")
async def reporting(get: CL.CL_REPORTING,api_key: APIKey = Depends(auth.get_api_key)):
print(f"{get.user}")
print(f"{get.lastaccess}")
lastacces = datetime.strftime(get.lastaccess)
print(f"{lastacces}")
print(f"{get.ipaddres}")
## Startet den API-Server
if __name__ == '__main__':