From a9ea33dd180c94808c69da30802c512d929dcb42 Mon Sep 17 00:00:00 2001 From: curo1305 Date: Thu, 28 May 2026 21:12:27 +0200 Subject: [PATCH] feat(05-04): fix storage factory to dispatch nextcloud to NextcloudBackend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- backend/storage/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/backend/storage/__init__.py b/backend/storage/__init__.py index 8c33a4f..eca8eb8 100644 --- a/backend/storage/__init__.py +++ b/backend/storage/__init__.py @@ -114,7 +114,14 @@ async def get_storage_backend_for_document( elif provider == "onedrive": from storage.onedrive_backend import OneDriveBackend # type: ignore[import] 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] return WebDAVBackend( credentials["server_url"],