diff --git a/web/app/common/api.js b/web/app/common/api.js index f8afcbbb..ec09e7bf 100644 --- a/web/app/common/api.js +++ b/web/app/common/api.js @@ -29,7 +29,7 @@ export const putCommentVote = ({ id, url, value }) => fetcher.put({ withCredentials: true, }); -export const send = ({ text, pid }) => fetcher.post({ +export const addComment = ({ text, pid }) => fetcher.post({ url: '/comment', body: { text, @@ -112,8 +112,8 @@ export default { getCommentsCount, getComment, getUserComments, - putCommentVote, - send, + putCommentVote, + addComment, edit, getUser, getPreview, diff --git a/web/app/components/input/input.jsx b/web/app/components/input/input.jsx index 6b080c28..fd0f7c96 100644 --- a/web/app/components/input/input.jsx +++ b/web/app/components/input/input.jsx @@ -94,7 +94,7 @@ export default class Input extends Component { const request = mods.mode === 'edit' ? api.edit({ text, id }) - : api.send({ text, ...(pid ? { pid } : {}) }); + : api.addComment({ text, ...(pid ? { pid } : {}) }); request .then(comment => {