From 8f6243723bf50b9ee6fe11d892f51a90d0e31e6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= <40151420+ldericher@users.noreply.github.com> Date: Fri, 20 Oct 2023 13:12:44 +0200 Subject: [PATCH] refac: fix file router startup --- api/ovdashboard_api/routers/v1/file.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/api/ovdashboard_api/routers/v1/file.py b/api/ovdashboard_api/routers/v1/file.py index b49362e..4a79523 100644 --- a/api/ovdashboard_api/routers/v1/file.py +++ b/api/ovdashboard_api/routers/v1/file.py @@ -15,7 +15,7 @@ from fastapi import APIRouter, Depends from fastapi.responses import StreamingResponse from magic import Magic -# from ...core.dav_common import webdav_ensure_files, webdav_ensure_path +from ...core.dav_common import webdav_ensure_files, webdav_ensure_path from ...core.webdav import WebDAV from ._common import FileNameLister, PrefixFinder, PrefixUnique @@ -40,12 +40,12 @@ file_unique = PrefixUnique(file_finder) async def start_router() -> None: _logger.debug(f"{router.prefix} router starting.") - # if not webdav_ensure_path(await file_lister.remote_path): - # webdav_ensure_files( - # await file_lister.remote_path, - # "logo.svg", - # "thw.svg", - # ) + if not webdav_ensure_path(await file_lister.remote_path): + webdav_ensure_files( + await file_lister.remote_path, + "logo.svg", + "thw.svg", + ) @router.get(