From c1e9cdc6b96be31a043f3994eb27ee349904e2e1 Mon Sep 17 00:00:00 2001
From: ErickSkrauch
Date: Tue, 18 Apr 2017 19:47:46 +0300
Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=8B=D1=82=D0=BA=D0=B0=20?=
=?UTF-8?q?=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D1=82=D1=8C=20frontend=20=D0=B4?=
=?UTF-8?q?=D0=BB=D1=8F=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5?=
=?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D0=BA=D0=B0=D0=BF=D1=87=D0=B8=20=D0=BD?=
=?UTF-8?q?=D0=B0=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D0=B5=20?=
=?UTF-8?q?=D0=B7=D0=B0=D0=BF=D1=80=D0=BE=D1=81=D0=B0=20=D0=B2=D0=BE=D1=81?=
=?UTF-8?q?=D1=81=D1=82=D0=B0=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8?=
=?UTF-8?q?=D1=8F=20=D0=BF=D0=B0=D1=80=D0=BE=D0=BB=D1=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/auth/actions.js | 5 +++--
src/components/auth/forgotPassword/ForgotPasswordBody.jsx | 4 +++-
src/services/api/authentication.js | 5 +++--
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/components/auth/actions.js b/src/components/auth/actions.js
index 68701df..f369dac 100644
--- a/src/components/auth/actions.js
+++ b/src/components/auth/actions.js
@@ -81,10 +81,11 @@ export function acceptRules() {
}
export function forgotPassword({
- login = ''
+ login = '',
+ captcha = ''
}) {
return wrapInLoader((dispatch, getState) =>
- authentication.forgotPassword({login})
+ authentication.forgotPassword({login, captcha})
.then(({data = {}}) => dispatch(updateUser({
maskedEmail: data.emailMask || getState().user.email
})))
diff --git a/src/components/auth/forgotPassword/ForgotPasswordBody.jsx b/src/components/auth/forgotPassword/ForgotPasswordBody.jsx
index 67f7ba1..e95d078 100644
--- a/src/components/auth/forgotPassword/ForgotPasswordBody.jsx
+++ b/src/components/auth/forgotPassword/ForgotPasswordBody.jsx
@@ -2,7 +2,7 @@ import React from 'react';
import { FormattedMessage as Message } from 'react-intl';
-import { Input } from 'components/ui/form';
+import { Input, Captcha } from 'components/ui/form';
import icons from 'components/ui/icons.scss';
import BaseAuthBody from 'components/auth/BaseAuthBody';
@@ -57,6 +57,8 @@ export default class ForgotPasswordBody extends BaseAuthBody {
)}
+
+
);
}
diff --git a/src/services/api/authentication.js b/src/services/api/authentication.js
index 69d3a92..0361e48 100644
--- a/src/services/api/authentication.js
+++ b/src/services/api/authentication.js
@@ -28,11 +28,12 @@ const authentication = {
},
forgotPassword({
- login = ''
+ login = '',
+ captcha = ''
}) {
return request.post(
'/api/authentication/forgot-password',
- {login},
+ {login, captcha},
{token: null}
);
},