mirror of
https://github.com/wassname/talk.git
synced 2026-08-11 11:27:10 +08:00
SMall changes for PR.
This commit is contained in:
@@ -9,10 +9,8 @@ import I18n from 'coral-framework/modules/i18n/i18n';
|
||||
import translations from '../translations';
|
||||
const lang = new I18n(translations);
|
||||
|
||||
const BanUserDialog = ({open, handleClose, onClickBanUser, user}) => {
|
||||
const userName = (typeof user === 'undefined') ? '' : user['userName'];
|
||||
const userId = (typeof user === 'undefined') ? '' : user['userId'];
|
||||
const commentId = (typeof user === 'undefined') ? '' : user['commentId'];
|
||||
const BanUserDialog = ({open, handleClose, onClickBanUser, user = {}}) => {
|
||||
const {userName = '', userId = '', commentId = ''} = user;
|
||||
|
||||
return (
|
||||
<Dialog className={styles.dialog} open={open} onClose={() => handleClose()} onCancel={() => handleClose()} title={lang.t('bandialog.ban_user')}>
|
||||
|
||||
@@ -50,8 +50,6 @@ export default props => {
|
||||
);
|
||||
};
|
||||
|
||||
//return props.author.get('status') === 'banned' ? 'disabled' : 'raised';
|
||||
|
||||
// Get the button of the action performed over a comment if any
|
||||
const getActionButton = (action, i, props) => {
|
||||
const status = props.comment.get('status');
|
||||
|
||||
@@ -2,7 +2,7 @@ import {Map, List, fromJS} from 'immutable';
|
||||
|
||||
const initialState = Map({
|
||||
byId: Map(),
|
||||
ids: List(),
|
||||
ids: List()
|
||||
});
|
||||
|
||||
export default (state = initialState, action) => {
|
||||
|
||||
@@ -51,7 +51,7 @@ router.post('/:user_id/status', (req, res, next) => {
|
||||
User
|
||||
.setStatus(req.params.user_id, req.body.status, req.body.comment_id)
|
||||
.then(status => {
|
||||
res.send(status);
|
||||
res.json(status);
|
||||
})
|
||||
.catch(next);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user