#unpin @method -rename
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user