#send @method -rename

This commit is contained in:
Alex
2018-06-23 22:56:54 +03:00
parent 7e27cf5060
commit 48bcadbceb
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -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,
+1 -1
View File
@@ -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 => {