feat(05-04): fix storage factory to dispatch nextcloud to NextcloudBackend

- Previously both 'nextcloud' and 'webdav' providers were dispatched to WebDAVBackend
- Now 'nextcloud' uses NextcloudBackend (has list_folder); 'webdav' uses WebDAVBackend
- Both share identical constructor signature (server_url, username, password)
- Removes type: ignore[import] concern on nextcloud_backend — module now exists
This commit is contained in:
curo1305
2026-05-28 21:12:27 +02:00
parent 1b9573f398
commit a9ea33dd18
+8 -1
View File
@@ -114,7 +114,14 @@ async def get_storage_backend_for_document(
elif provider == "onedrive": elif provider == "onedrive":
from storage.onedrive_backend import OneDriveBackend # type: ignore[import] from storage.onedrive_backend import OneDriveBackend # type: ignore[import]
return OneDriveBackend(credentials) return OneDriveBackend(credentials)
elif provider in ("nextcloud", "webdav"): elif provider == "nextcloud":
from storage.nextcloud_backend import NextcloudBackend # type: ignore[import]
return NextcloudBackend(
credentials["server_url"],
credentials["username"],
credentials["password"],
)
elif provider == "webdav":
from storage.webdav_backend import WebDAVBackend # type: ignore[import] from storage.webdav_backend import WebDAVBackend # type: ignore[import]
return WebDAVBackend( return WebDAVBackend(
credentials["server_url"], credentials["server_url"],