From 50f67e5ad5a114fff7be4eb8859081fe8e27bb44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= <40151420+ldericher@users.noreply.github.com> Date: Fri, 27 Oct 2023 00:40:04 +0200 Subject: [PATCH] api: minor fixes --- api/ovdashboard_api/core/settings.py | 2 +- api/ovdashboard_api/routers/v1/misc.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/ovdashboard_api/core/settings.py b/api/ovdashboard_api/core/settings.py index 21c5af3..6cc11fa 100644 --- a/api/ovdashboard_api/core/settings.py +++ b/api/ovdashboard_api/core/settings.py @@ -25,7 +25,7 @@ class DAVSettings(BaseModel): username: str | None = None password: str | None = None - cache_ttl: int = 60 * 30 + cache_ttl: int = 60 * 10 cache_size: int = 1024 @property diff --git a/api/ovdashboard_api/routers/v1/misc.py b/api/ovdashboard_api/routers/v1/misc.py index 23dc2a3..8f5ea3b 100644 --- a/api/ovdashboard_api/routers/v1/misc.py +++ b/api/ovdashboard_api/routers/v1/misc.py @@ -31,8 +31,8 @@ async def get_lan_ip() -> str: family=AF_INET, type=SOCK_DGRAM, ) as s: - s.settimeout(0) try: + s.settimeout(0) s.connect((SETTINGS.ping_host, SETTINGS.ping_port)) IP = s.getsockname()[0] @@ -44,7 +44,7 @@ async def get_lan_ip() -> str: @router.get("/version") async def get_server_api_version() -> str: - return importlib.metadata.version("ovdashboard-api") + return importlib.metadata.version("ovdashboard_api") @router.get("/config/server")