Browse Source

nextcloud: Add assertion to prevent loginName/username problems

pull/201/head
jld3103 2 years ago
parent
commit
f8871276dc
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 3
      packages/nextcloud/lib/src/client.dart

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

@ -12,7 +12,8 @@ class NextcloudClient extends openapi.NextcloudClient {
final AppType appType = AppType.unknown,
final String? userAgentOverride,
super.cookieJar,
}) : super(
}) : assert(loginName != null || username == null, 'Provide loginName instead of username or both'),
super(
baseHeaders: (<String, String?>{
'OCS-APIRequest': 'true',
'Accept': 'application/json',

Loading…
Cancel
Save