mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-25 19:27:24 +02:00
client: Allow changing email and password seperately
This commit is contained in:
parent
088da9bd55
commit
8d1c2d3a23
1 changed files with 7 additions and 3 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue