diff --git a/client/coral-admin/src/actions/community.js b/client/coral-admin/src/actions/community.js index 6a091d214..875cc6cbe 100644 --- a/client/coral-admin/src/actions/community.js +++ b/client/coral-admin/src/actions/community.js @@ -8,7 +8,6 @@ import { SET_PAGE, SET_SEARCH_VALUE, SET_ROLE, - SET_COMMENTER_STATUS, SHOW_BANUSER_DIALOG, HIDE_BANUSER_DIALOG, SHOW_REJECT_USERNAME_DIALOG, @@ -63,13 +62,6 @@ export const setRole = (id, role) => (dispatch, _, {rest}) => { }); }; -export const setCommenterStatus = (id, status) => (dispatch, _, {rest}) => { - return rest(`/users/${id}/status`, {method: 'POST', body: {status}}) - .then(() => { - return dispatch({type: SET_COMMENTER_STATUS, id, status}); - }); -}; - // Ban User Dialog export const showBanUserDialog = (user) => ({type: SHOW_BANUSER_DIALOG, user}); export const hideBanUserDialog = () => ({type: HIDE_BANUSER_DIALOG}); diff --git a/client/coral-admin/src/constants/community.js b/client/coral-admin/src/constants/community.js index eea946efb..e118b0824 100644 --- a/client/coral-admin/src/constants/community.js +++ b/client/coral-admin/src/constants/community.js @@ -7,7 +7,6 @@ export const FETCH_USERS_FAILURE = `${prefix}_FETCH_USERS_FAILURE`; export const SORT_UPDATE = `${prefix}_SORT_UPDATE`; export const SET_PAGE = `${prefix}_SET_PAGE`; export const SET_ROLE = `${prefix}_SET_ROLE`; -export const SET_COMMENTER_STATUS = `${prefix}_SET_COMMENTER_STATUS`; export const FETCH_FLAGGED_COMMENTERS_REQUEST = `${prefix}_FETCH_FLAGGED_COMMENTERS_REQUEST`; export const FETCH_FLAGGED_COMMENTERS_SUCCESS = `${prefix}_FETCH_FLAGGED_COMMENTERS_SUCCESS`; diff --git a/client/coral-admin/src/reducers/community.js b/client/coral-admin/src/reducers/community.js index 170804b60..63dfce067 100644 --- a/client/coral-admin/src/reducers/community.js +++ b/client/coral-admin/src/reducers/community.js @@ -6,7 +6,6 @@ import { SET_PAGE, SET_SEARCH_VALUE, SET_ROLE, - SET_COMMENTER_STATUS, SHOW_BANUSER_DIALOG, HIDE_BANUSER_DIALOG, SHOW_REJECT_USERNAME_DIALOG, @@ -70,17 +69,6 @@ export default function community (state = initialState, action) { users: commenters.map((id) => id), }; } - case SET_COMMENTER_STATUS: { - const commenters = state.users; - const idx = commenters.findIndex((el) => el.id === action.id); - - commenters[idx].status = action.status; - return { - ...state, - users: commenters.map((id) => id), - }; - - } case SORT_UPDATE : return { ...state,