diff --git a/web/app/common/api.js b/web/app/common/api.js index bdbc4c13..a067fc1c 100644 --- a/web/app/common/api.js +++ b/web/app/common/api.js @@ -84,7 +84,7 @@ export const removeVerifyStatus = ({ id }) => fetcher.put({ withCredentials: true, }); -export const remove = ({ id }) => fetcher.delete({ +export const removeComment = ({ id }) => fetcher.delete({ url: `/admin/comment/${id}?url=${url}`, withCredentials: true, }); @@ -122,7 +122,7 @@ export default { unpinComment, setVerifyStatus, removeVerifyStatus, - remove, + removeComment, blockUser, unblockUser, getBlocked, diff --git a/web/app/components/comment/comment.jsx b/web/app/components/comment/comment.jsx index 1bc0188b..39d8ede2 100644 --- a/web/app/components/comment/comment.jsx +++ b/web/app/components/comment/comment.jsx @@ -213,7 +213,7 @@ export default class Comment extends Component { isReplying: false, }); - api.remove({ id }).then(() => { + api.removeComment({ id }).then(() => { api.getComment({ id }).then(comment => store.replaceComment(comment)); }); }