diff --git a/web/app/common/api.js b/web/app/common/api.js index 3047fc21..614bf0e0 100644 --- a/web/app/common/api.js +++ b/web/app/common/api.js @@ -69,7 +69,7 @@ export const pinComment = ({ id, url }) => fetcher.put({ withCredentials: true, }); -export const unpin = ({ id, url }) => fetcher.put({ +export const unpinComment = ({ id, url }) => fetcher.put({ url: `/admin/pin/${id}?url=${url}&pin=0`, withCredentials: true, }); @@ -119,7 +119,7 @@ export default { getPreview, pinComment, - unpin, + unpinComment, verify, unverify, remove, diff --git a/web/app/components/comment/comment.jsx b/web/app/components/comment/comment.jsx index 6a49335d..7bbb80f3 100644 --- a/web/app/components/comment/comment.jsx +++ b/web/app/components/comment/comment.jsx @@ -149,7 +149,7 @@ export default class Comment extends Component { if (confirm('Do you want to unpin this comment?')) { this.setState({ pinned: false }); - api.unpin({ id, url }).then(() => { + api.unpinComment({ id, url }).then(() => { api.getComment({ id }).then(comment => store.replaceComment(comment)); }); }