#unverify @method -rename
This commit is contained in:
@@ -79,7 +79,7 @@ export const setVerifyStatus = ({ id }) => fetcher.put({
|
||||
withCredentials: true,
|
||||
});
|
||||
|
||||
export const unverify = ({ id }) => fetcher.put({
|
||||
export const removeVerifyStatus = ({ id }) => fetcher.put({
|
||||
url: `/admin/verify/${id}?verified=0`,
|
||||
withCredentials: true,
|
||||
});
|
||||
@@ -121,7 +121,7 @@ export default {
|
||||
pinComment,
|
||||
unpinComment,
|
||||
setVerifyStatus,
|
||||
unverify,
|
||||
removeVerifyStatus,
|
||||
remove,
|
||||
blockUser,
|
||||
unblockUser,
|
||||
|
||||
@@ -173,7 +173,7 @@ export default class Comment extends Component {
|
||||
if (confirm('Do you want to unverify this user?')) {
|
||||
this.setState({ isUserVerified: false });
|
||||
|
||||
api.unverify({ id: userId }).then(() => {
|
||||
api.removeVerifyStatus({ id: userId }).then(() => {
|
||||
api.getComment({ id }).then(comment => store.replaceComment(comment));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user