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