Browse Source

fix(nextcloud): Drop unused username

pull/526/head
jld3103 1 year ago
parent
commit
cb1f82fc6e
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 7
      packages/nextcloud/lib/src/client.dart
  2. 2
      packages/nextcloud/test/helper.dart

7
packages/nextcloud/lib/src/client.dart

@ -17,14 +17,12 @@ class NextcloudClient extends DynamiteClient {
NextcloudClient( NextcloudClient(
super.baseURL, { super.baseURL, {
this.loginName, this.loginName,
this.username,
final String? password, final String? password,
final String? language, final String? language,
final AppType appType = AppType.unknown, final AppType appType = AppType.unknown,
final String? userAgentOverride, final String? userAgentOverride,
super.cookieJar, super.cookieJar,
}) : assert(loginName != null || username == null, 'Provide loginName instead of username or both'), }) : super(
super(
baseHeaders: (<String, String?>{ baseHeaders: (<String, String?>{
'OCS-APIRequest': 'true', 'OCS-APIRequest': 'true',
'Accept-Language': language, '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. /// Identifier used for authentication. This can be the username or email or something else.
final String? loginName; final String? loginName;
/// Username of the user on the server
final String? username;
WebDavClient? _webdav; WebDavClient? _webdav;
CoreClient? _core; CoreClient? _core;
NewsClient? _news; NewsClient? _news;

2
packages/nextcloud/test/helper.dart

@ -76,7 +76,6 @@ class TestNextcloudClient extends NextcloudClient {
TestNextcloudClient( TestNextcloudClient(
super.baseURL, { super.baseURL, {
super.loginName, super.loginName,
super.username,
super.password, super.password,
super.language, super.language,
super.appType, super.appType,
@ -126,7 +125,6 @@ Future<TestNextcloudClient> getTestClient(
final client = TestNextcloudClient( final client = TestNextcloudClient(
'http://localhost:${container.port}', 'http://localhost:${container.port}',
loginName: username, loginName: username,
username: username,
password: clientPassword, password: clientPassword,
appType: appType, appType: appType,
userAgentOverride: userAgentOverride, userAgentOverride: userAgentOverride,

Loading…
Cancel
Save