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

Can disconnect current user from all his devices

This commit is contained in:
2020-05-01 09:42:01 +02:00
parent 02e60ad87c
commit 9b427b9683
2 changed files with 32 additions and 0 deletions

View File

@ -139,4 +139,12 @@ class AccountHelper {
if (_currentUserID == -1) throw "Current user ID has not been loaded yet!";
return _currentUserID;
}
/// Disconnect all the devices of the current user
///
/// Throws in case of failure
static Future<void> disconnectAllDevices() async {
await APIRequest(uri: "account/disconnect_all_devices", needLogin: true)
.execWithThrow();
}
}