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:
@@ -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"],
|
||||
|
||||
Reference in New Issue
Block a user