From 281d4f6552982253fbe5535012264d17b11cc95b Mon Sep 17 00:00:00 2001 From: gaba Date: Tue, 29 Nov 2016 11:17:27 -0800 Subject: [PATCH] Reverting --- client/coral-admin/src/actions/community.js | 10 +--------- client/coral-admin/src/actions/users.js | 14 +++++++------- client/coral-admin/src/components/Comment.js | 12 ++++++------ .../src/containers/Community/Community.js | 4 ++-- .../containers/ModerationQueue/ModerationQueue.js | 14 +++++++------- 5 files changed, 23 insertions(+), 31 deletions(-) diff --git a/client/coral-admin/src/actions/community.js b/client/coral-admin/src/actions/community.js index 32c261f26..5921573d1 100644 --- a/client/coral-admin/src/actions/community.js +++ b/client/coral-admin/src/actions/community.js @@ -6,8 +6,7 @@ import { FETCH_COMMENTERS_FAILURE, SORT_UPDATE, COMMENTERS_NEW_PAGE, - SET_ROLE, - SET_STATUS + SET_ROLE } from '../constants/community'; import {base, getInit, handleResp} from '../../../coral-framework/helpers/response'; @@ -48,10 +47,3 @@ export const setRole = (id, role) => dispatch => { return dispatch({type: SET_ROLE, id, role}); }); }; - -export const setStatus = (id, status) => dispatch => { - return fetch(`${base}/user/${id}/status`, getInit('POST', {status})) - .then(() => { - return dispatch({type: SET_STATUS, id, status}); - }); -}; diff --git a/client/coral-admin/src/actions/users.js b/client/coral-admin/src/actions/users.js index 8747293c4..811672266 100644 --- a/client/coral-admin/src/actions/users.js +++ b/client/coral-admin/src/actions/users.js @@ -1,7 +1,7 @@ -/** - * Action disptacher related to users - */ - -export const updateUserStatus = (status, id) => (dispatch) => { - dispatch({type: 'USER_STATUS_UPDATE', id, status}); -}; +// /** +// * Action disptacher related to users +// */ +// +// export const updateUserStatus = (status, id) => (dispatch) => { +// dispatch({type: 'USER_STATUS_UPDATE', id, status}); +// }; diff --git a/client/coral-admin/src/components/Comment.js b/client/coral-admin/src/components/Comment.js index 93ae04013..e9e637ecb 100644 --- a/client/coral-admin/src/components/Comment.js +++ b/client/coral-admin/src/components/Comment.js @@ -52,14 +52,14 @@ export default props => { // Check if an action can be performed over a comment const canShowAction = (action, comment) => { - const status = comment.get('status'); // accepted + const status = comment.get('status'); const flagged = comment.get('flagged'); - const banned = comment.get('banned'); + //const banned = comment.get('banned'); - // If the user that authored the comment is banned then do not ban it again. - if (action === 'ban' && !banned) { - return false; - } + // // If the user that authored the comment is banned then do not ban it again. + // if (action === 'ban' && !banned) { + // return false; + // } // If it is flagged do not flag it . if (action === 'flag' && (status || flagged === true)) { diff --git a/client/coral-admin/src/containers/Community/Community.js b/client/coral-admin/src/containers/Community/Community.js index 374b7dd6b..0578cc589 100644 --- a/client/coral-admin/src/containers/Community/Community.js +++ b/client/coral-admin/src/containers/Community/Community.js @@ -54,8 +54,8 @@ const Community = ({isFetching, commenters, ...props}) => { - { isFetching && } - { !hasResults && } + { isFetching && } + { !hasResults && } { hasResults &&