diff --git a/web/app/common/api.js b/web/app/common/api.js index 614bf0e0..08542303 100644 --- a/web/app/common/api.js +++ b/web/app/common/api.js @@ -74,7 +74,7 @@ export const unpinComment = ({ id, url }) => fetcher.put({ withCredentials: true, }); -export const verify = ({ id }) => fetcher.put({ +export const setVerifyStatus = ({ id }) => fetcher.put({ url: `/admin/verify/${id}?verified=1`, withCredentials: true, }); @@ -120,7 +120,7 @@ export default { pinComment, unpinComment, - verify, + setVerifyStatus, unverify, remove, blockUser, diff --git a/web/app/components/comment/comment.jsx b/web/app/components/comment/comment.jsx index 7bbb80f3..7a13264e 100644 --- a/web/app/components/comment/comment.jsx +++ b/web/app/components/comment/comment.jsx @@ -161,7 +161,7 @@ export default class Comment extends Component { if (confirm('Do you want to verify this user?')) { this.setState({ isUserVerified: true }); - api.verify({ id: userId }).then(() => { + api.setVerifyStatus({ id: userId }).then(() => { api.getComment({ id }).then(comment => store.replaceComment(comment)); }); }