refac: fix file router startup

This commit is contained in:
Jörn-Michael Miehe 2023-10-20 13:12:44 +02:00
parent 19c6772b88
commit 8f6243723b

View file

@ -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(