From f8871276dc57d3dcdbd949f6b7ccc513d9048fc0 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sat, 11 Mar 2023 13:25:53 +0100 Subject: [PATCH] nextcloud: Add assertion to prevent loginName/username problems --- packages/nextcloud/lib/src/client.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nextcloud/lib/src/client.dart b/packages/nextcloud/lib/src/client.dart index 87398b4e..ae7b33aa 100644 --- a/packages/nextcloud/lib/src/client.dart +++ b/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: ({ 'OCS-APIRequest': 'true', 'Accept': 'application/json',