diff options
author | Björn Roland <bjoernr-de@users.noreply.github.com> | 2016-12-21 18:48:06 +0100 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-12-21 12:48:06 -0500 |
commit | f0f53260984a210f44458d86ed5ac9e3afb3f363 (patch) | |
tree | 0e1ce408c07906b66eaf5355ffde07b637ccf19a /webapp/actions/user_actions.jsx | |
parent | cadc9e11e4c5456bae97d8ba4031ea9e72edf7fb (diff) | |
download | chat-f0f53260984a210f44458d86ed5ac9e3afb3f363.tar.gz chat-f0f53260984a210f44458d86ed5ac9e3afb3f363.tar.bz2 chat-f0f53260984a210f44458d86ed5ac9e3afb3f363.zip |
#4698 Move Client.updateActive() in components to an action (#4858)
* #4698 Move instances of Client.updateActive() in components to an action
* Use null for empty success function
Diffstat (limited to 'webapp/actions/user_actions.jsx')
-rw-r--r-- | webapp/actions/user_actions.jsx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/webapp/actions/user_actions.jsx b/webapp/actions/user_actions.jsx index 812bc2716..b666413d9 100644 --- a/webapp/actions/user_actions.jsx +++ b/webapp/actions/user_actions.jsx @@ -432,3 +432,20 @@ export function checkMfa(loginId, success, error) { } ); } + +export function updateActive(userId, active, success, error) { + Client.updateActive(userId, active, + () => { + AsyncClient.getUser(userId); + + if (success) { + success(); + } + }, + (err) => { + if (error) { + error(err); + } + } + ); +} |