From 8d1c2d3a2360c8b6a2f3d9de81b9f08d2c9094d8 Mon Sep 17 00:00:00 2001 From: Elias Projahn Date: Wed, 13 May 2020 16:01:04 +0200 Subject: [PATCH] client: Allow changing email and password seperately --- client/lib/src/client.dart | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/client/lib/src/client.dart b/client/lib/src/client.dart index 451aee9..c4a9ca0 100644 --- a/client/lib/src/client.dart +++ b/client/lib/src/client.dart @@ -148,9 +148,13 @@ class MusicusClient { /// Change the account details for the currently used user account. /// - /// This will throw a [MusicusLoginFailedException] if the account doesn't - /// exist or the old password was wrong. - Future updateAccount(String newEmail, String newPassword) async { + /// If a parameter is null, it will not be changed. This will throw a + /// [MusicusLoginFailedException] if the account doesn't exist or the old + /// password was wrong. + Future updateAccount({ + String newEmail, + String newPassword, + }) async { assert(_credentials != null); final response = await _client.post(