client: Allow changing email and password seperately

This commit is contained in:
Elias Projahn 2020-05-13 16:01:04 +02:00
parent 088da9bd55
commit 8d1c2d3a23

View file

@ -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<void> 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<void> updateAccount({
String newEmail,
String newPassword,
}) async {
assert(_credentials != null);
final response = await _client.post(