Реализована форма обратной связи

This commit is contained in:
ErickSkrauch 2016-06-15 23:54:13 +03:00
parent c883b3afaf
commit 56d88100da
3 changed files with 6 additions and 16 deletions

View File

@ -4,7 +4,7 @@ import classNames from 'classnames';
import { FormattedMessage as Message } from 'react-intl';
import { Input, TextArea, Button, Form, FormModel, Dropdown } from 'components/ui/form';
import site from 'services/api/site';
import feedback from 'services/api/feedback';
import icons from 'components/ui/icons.scss';
import popupStyles from 'components/ui/popup/popup.scss';
@ -94,7 +94,7 @@ export default class ContactForm extends Component {
}
onSubmit = () => {
site.contact(this.form.serialize())
feedback(this.form.serialize())
.then(this.props.onClose)
.catch((resp) => {
if (resp.errors) {

View File

@ -0,0 +1,4 @@
import request from 'services/request';
export default ({subject = '', email = '', message = ''}) =>
request.post('/api/feedback', {subject, email, message});

View File

@ -1,14 +0,0 @@
import request from 'services/request';
export default {
contact({
subject = '',
email = '',
message = ''
}) {
return request.post(
'/api/site/contact',
{subject, email, message}
);
}
};