#verify @method -rename

This commit is contained in:
Alex
2018-06-23 23:11:34 +03:00
parent 400905c8ff
commit 72f1f774f5
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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,
+1 -1
View File
@@ -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));
});
}