1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 00:05:16 +00:00

Do delete user account

This commit is contained in:
2020-05-01 10:56:57 +02:00
parent e204c62ba9
commit 4c1e33a264
2 changed files with 12 additions and 1 deletions

View File

@ -147,4 +147,13 @@ class AccountHelper {
await APIRequest(uri: "account/disconnect_all_devices", needLogin: true)
.execWithThrow();
}
/// Remove permanently a user account
///
/// Throws in case of failure
static Future<void> deleteAccount(String password) async {
await APIRequest(uri: "account/delete", needLogin: true)
.addString("password", password)
.execWithThrow();
}
}