#pin @method -rename

This commit is contained in:
Alex
2018-06-23 23:08:41 +03:00
parent 0171fc85b5
commit 7b7934e93c
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -64,7 +64,7 @@ export const getUser = () => fetcher.get({
});
/* admin */
export const pin = ({ id, url }) => fetcher.put({
export const pinComment = ({ id, url }) => fetcher.put({
url: `/admin/pin/${id}?url=${url}&pin=1`,
withCredentials: true,
});
@@ -118,7 +118,7 @@ export default {
getUser,
getPreview,
pin,
pinComment,
unpin,
verify,
unverify,
+1 -1
View File
@@ -137,7 +137,7 @@ export default class Comment extends Component {
if (confirm('Do you want to pin this comment?')) {
this.setState({ pinned: true });
api.pin({ id, url }).then(() => {
api.pinComment({ id, url }).then(() => {
api.getComment({ id }).then(comment => store.replaceComment(comment));
});
}