diff --git a/src/components/contact/ContactForm.jsx b/src/components/contact/ContactForm.jsx index 6c0c3eb..46e911e 100644 --- a/src/components/contact/ContactForm.jsx +++ b/src/components/contact/ContactForm.jsx @@ -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) { diff --git a/src/services/api/feedback.js b/src/services/api/feedback.js new file mode 100644 index 0000000..340d24d --- /dev/null +++ b/src/services/api/feedback.js @@ -0,0 +1,4 @@ +import request from 'services/request'; + +export default ({subject = '', email = '', message = ''}) => + request.post('/api/feedback', {subject, email, message}); diff --git a/src/services/api/site.js b/src/services/api/site.js deleted file mode 100644 index d9004ab..0000000 --- a/src/services/api/site.js +++ /dev/null @@ -1,14 +0,0 @@ -import request from 'services/request'; - -export default { - contact({ - subject = '', - email = '', - message = '' - }) { - return request.post( - '/api/site/contact', - {subject, email, message} - ); - } -};