From b87cd4e276cd0ef3c90e78cddd0b8b87e52e5ede Mon Sep 17 00:00:00 2001
From: Carlos Tadeu Panato Junior <ctadeu@gmail.com>
Date: Tue, 24 Jan 2017 10:23:09 +0100
Subject: Move instances of Client.resetPassword() in components to an action
 (#5167)

---
 webapp/components/password_reset_form.jsx | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

(limited to 'webapp/components/password_reset_form.jsx')

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});
-- 
cgit v1.2.3-1-g7c22

