mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 00:05:16 +00:00
Can change password
This commit is contained in:
@ -151,4 +151,14 @@ class SettingsHelper {
|
||||
await APIRequest(uri: "settings/check_password", needLogin: true)
|
||||
.addString("password", password)
|
||||
.execWithThrow();
|
||||
|
||||
/// Change user password
|
||||
///
|
||||
/// Throws in case of failure
|
||||
static Future<void> changePassword(
|
||||
String oldPassword, String newPassword) async =>
|
||||
await APIRequest(uri: "settings/update_password", needLogin: true)
|
||||
.addString("oldPassword", oldPassword)
|
||||
.addString("newPassword", newPassword)
|
||||
.execWithThrow();
|
||||
}
|
||||
|
Reference in New Issue
Block a user