diff options
author | Carlos Tadeu Panato Junior <ctadeu@gmail.com> | 2017-01-24 10:23:09 +0100 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2017-01-24 09:23:09 +0000 |
commit | b87cd4e276cd0ef3c90e78cddd0b8b87e52e5ede (patch) | |
tree | a883b96f4dceb44922783282a5e29236a5f3ed15 /webapp/components | |
parent | 1e5354cff3adc49de8a7c4ace5905b1ef914bda2 (diff) | |
download | chat-b87cd4e276cd0ef3c90e78cddd0b8b87e52e5ede.tar.gz chat-b87cd4e276cd0ef3c90e78cddd0b8b87e52e5ede.tar.bz2 chat-b87cd4e276cd0ef3c90e78cddd0b8b87e52e5ede.zip |
Move instances of Client.resetPassword() in components to an action (#5167)
Diffstat (limited to 'webapp/components')
-rw-r--r-- | webapp/components/password_reset_form.jsx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/webapp/components/password_reset_form.jsx b/webapp/components/password_reset_form.jsx index b37e07f2d..c6fe2525f 100644 --- a/webapp/components/password_reset_form.jsx +++ b/webapp/components/password_reset_form.jsx @@ -2,12 +2,12 @@ // See License.txt for license information. import ReactDOM from 'react-dom'; -import Client from 'client/web_client.jsx'; import * as Utils from 'utils/utils.jsx'; import Constants from 'utils/constants.jsx'; import {FormattedMessage} from 'react-intl'; -import {browserHistory} from 'react-router/es6'; + +import {resetPassword} from 'actions/user_actions.jsx'; import React from 'react'; @@ -42,12 +42,11 @@ class PasswordResetForm extends React.Component { error: null }); - Client.resetPassword( + resetPassword( this.props.location.query.code, password, () => { this.setState({error: null}); - browserHistory.push('/login?extra=' + Constants.PASSWORD_CHANGE); }, (err) => { this.setState({error: err.message}); |