api: minor fixes
This commit is contained in:
parent
a6fa709d52
commit
50f67e5ad5
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue