Moves banUser to users actions instead of comments actions.

This commit is contained in:
gaba
2016-12-08 18:16:17 -10:00
parent 0df1b9a498
commit 9bfac3872e
2 changed files with 11 additions and 4 deletions
+9 -3
View File
@@ -2,7 +2,13 @@
/**
* Action disptacher related to users
*/
export const banUser = (status, id, author_id) => (dispatch) => {
dispatch({type: 'USER_STATUS_UPDATE', id, author_id, status});
//
// export const banUser = (status, author_id) => (dispatch) => {
// dispatch({type: 'USER_STATUS_UPDATE', author_id, status});
// };
export const banUser = (status, userId, commentId) => {
return dispatch => {
dispatch({type: 'USER_BAN', status, userId, commentId});
dispatch({type: 'COMMENTS_MODERATION_QUEUE_FETCH'});
};
};
@@ -6,7 +6,8 @@ import ModerationKeysModal from 'components/ModerationKeysModal';
import CommentList from 'components/CommentList';
import BanUserDialog from 'components/BanUserDialog';
import {updateStatus, showBanUserDialog, hideBanUserDialog, banUser} from 'actions/comments';
import {updateStatus, showBanUserDialog, hideBanUserDialog} from 'actions/comments';
import {banUser} from 'actions/users';
import styles from './ModerationQueue.css';
import I18n from 'coral-framework/modules/i18n/i18n';