From cb1f82fc6e91f1f6fea23f7ea2417994628f8094 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Fri, 4 Aug 2023 10:39:37 +0200 Subject: [PATCH] fix(nextcloud): Drop unused username --- packages/nextcloud/lib/src/client.dart | 7 +------ packages/nextcloud/test/helper.dart | 2 -- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/nextcloud/lib/src/client.dart b/packages/nextcloud/lib/src/client.dart index 009b9bb9..0f08d4e8 100644 --- a/packages/nextcloud/lib/src/client.dart +++ b/packages/nextcloud/lib/src/client.dart @@ -17,14 +17,12 @@ class NextcloudClient extends DynamiteClient { NextcloudClient( super.baseURL, { this.loginName, - this.username, final String? password, final String? language, final AppType appType = AppType.unknown, final String? userAgentOverride, super.cookieJar, - }) : assert(loginName != null || username == null, 'Provide loginName instead of username or both'), - super( + }) : super( baseHeaders: ({ 'OCS-APIRequest': 'true', 'Accept-Language': language, @@ -44,9 +42,6 @@ class NextcloudClient extends DynamiteClient { /// Identifier used for authentication. This can be the username or email or something else. final String? loginName; - /// Username of the user on the server - final String? username; - WebDavClient? _webdav; CoreClient? _core; NewsClient? _news; diff --git a/packages/nextcloud/test/helper.dart b/packages/nextcloud/test/helper.dart index 19f01fe7..1d1fa14f 100644 --- a/packages/nextcloud/test/helper.dart +++ b/packages/nextcloud/test/helper.dart @@ -76,7 +76,6 @@ class TestNextcloudClient extends NextcloudClient { TestNextcloudClient( super.baseURL, { super.loginName, - super.username, super.password, super.language, super.appType, @@ -126,7 +125,6 @@ Future getTestClient( final client = TestNextcloudClient( 'http://localhost:${container.port}', loginName: username, - username: username, password: clientPassword, appType: appType, userAgentOverride: userAgentOverride,