summaryrefslogtreecommitdiffstats
path: root/webapp/components/admin_console
diff options
context:
space:
mode:
authorBjörn Roland <bjoernr-de@users.noreply.github.com>2016-12-21 18:48:06 +0100
committerHarrison Healey <harrisonmhealey@gmail.com>2016-12-21 12:48:06 -0500
commitf0f53260984a210f44458d86ed5ac9e3afb3f363 (patch)
tree0e1ce408c07906b66eaf5355ffde07b637ccf19a /webapp/components/admin_console
parentcadc9e11e4c5456bae97d8ba4031ea9e72edf7fb (diff)
downloadchat-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/components/admin_console')
-rw-r--r--webapp/components/admin_console/admin_team_members_dropdown.jsx12
1 files changed, 3 insertions, 9 deletions
diff --git a/webapp/components/admin_console/admin_team_members_dropdown.jsx b/webapp/components/admin_console/admin_team_members_dropdown.jsx
index 253259493..4a42ded3a 100644
--- a/webapp/components/admin_console/admin_team_members_dropdown.jsx
+++ b/webapp/components/admin_console/admin_team_members_dropdown.jsx
@@ -10,7 +10,7 @@ import Client from 'client/web_client.jsx';
import Constants from 'utils/constants.jsx';
import * as Utils from 'utils/utils.jsx';
import * as AsyncClient from 'utils/async_client.jsx';
-import {updateUserRoles} from 'actions/user_actions.jsx';
+import {updateUserRoles, updateActive} from 'actions/user_actions.jsx';
import {FormattedMessage} from 'react-intl';
@@ -92,10 +92,7 @@ export default class AdminTeamMembersDropdown extends React.Component {
handleMakeActive(e) {
e.preventDefault();
- Client.updateActive(this.props.user.id, true,
- () => {
- AsyncClient.getUser(this.props.user.id);
- },
+ updateActive(this.props.user.id, true, null,
(err) => {
this.setState({serverError: err.message});
}
@@ -104,10 +101,7 @@ export default class AdminTeamMembersDropdown extends React.Component {
handleMakeNotActive(e) {
e.preventDefault();
- Client.updateActive(this.props.user.id, false,
- () => {
- AsyncClient.getUser(this.props.user.id);
- },
+ updateActive(this.props.user.id, false, null,
(err) => {
this.setState({serverError: err.message});
}