Can sign out from all connected devices

This commit is contained in:
2020-05-04 13:21:58 +02:00
parent f3b7091332
commit a7a33bbdb8
6 changed files with 104 additions and 4 deletions

View File

@ -4,7 +4,7 @@
* @author Pierre HUBERT
*/
ComunicWeb.components.account.interface = {
const AccountInterface = {
/**
* Send a request on the server to create an account
@ -134,6 +134,13 @@ ComunicWeb.components.account.interface = {
ComunicWeb.common.api.makeAPIrequest(apiURI, params, false, callback);
},
/**
* Disconnect user from all its connected devices
*/
disconnectAllDevices: async function() {
await api("/account/disconnect_all_devices", {}, true);
},
/**
* Request the export of all the data of the user
*
@ -162,4 +169,6 @@ ComunicWeb.components.account.interface = {
ComunicWeb.common.api.makeAPIrequest(apiURI, params, true, callback);
},
}
}
ComunicWeb.components.account.interface = AccountInterface;