mirror of
https://github.com/wassname/talk.git
synced 2026-08-12 12:30:39 +08:00
banUser and unBanUser - removing setUserStatus
This commit is contained in:
@@ -5,7 +5,7 @@ import {compose} from 'react-apollo';
|
||||
import {bindActionCreators} from 'redux';
|
||||
import {closeBanDialog, closeMenu} from '../actions';
|
||||
import {notify} from 'plugin-api/beta/client/actions/notification';
|
||||
import {connect, withSetCommentStatus, withSetUserBanStatus} from 'plugin-api/beta/client/hocs';
|
||||
import {connect, withSetCommentStatus, withBanUser} from 'plugin-api/beta/client/hocs';
|
||||
import {getErrorMessages} from 'plugin-api/beta/client/utils';
|
||||
import BanUserDialog from '../components/BanUserDialog';
|
||||
|
||||
@@ -20,11 +20,11 @@ class BanUserDialogContainer extends React.Component {
|
||||
closeMenu,
|
||||
closeBanDialog,
|
||||
setCommentStatus,
|
||||
setUserBanStatus
|
||||
banUser,
|
||||
} = this.props;
|
||||
|
||||
try {
|
||||
await setUserBanStatus({
|
||||
await banUser({
|
||||
id: authorId,
|
||||
status: true,
|
||||
});
|
||||
@@ -76,7 +76,7 @@ const mapDispatchToProps = (dispatch) =>
|
||||
const enhance = compose(
|
||||
connect(mapStateToProps, mapDispatchToProps),
|
||||
withSetCommentStatus,
|
||||
withSetUserBanStatus
|
||||
withBanUser,
|
||||
);
|
||||
|
||||
export default enhance(BanUserDialogContainer);
|
||||
|
||||
Reference in New Issue
Block a user