From 48bcadbceb7ab4ffe556b8982c2c612743eed702 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 23 Jun 2018 22:56:54 +0300 Subject: [PATCH] #send @method -rename --- web/app/common/api.js | 6 +++--- web/app/components/input/input.jsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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 => {