From 7b7934e93ce64e9ba8f94e46d1de4a02e9d0109b Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 23 Jun 2018 23:00:02 +0300 Subject: [PATCH] #pin @method -rename --- web/app/common/api.js | 4 ++-- web/app/components/comment/comment.jsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/app/common/api.js b/web/app/common/api.js index 920d4996..3047fc21 100644 --- a/web/app/common/api.js +++ b/web/app/common/api.js @@ -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, diff --git a/web/app/components/comment/comment.jsx b/web/app/components/comment/comment.jsx index 72fd8924..6a49335d 100644 --- a/web/app/components/comment/comment.jsx +++ b/web/app/components/comment/comment.jsx @@ -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)); }); }