From 72f1f774f51dc9d0478257b16ca964a3a3d8e8f2 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 23 Jun 2018 23:11:34 +0300 Subject: [PATCH] #verify @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 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)); }); }