Updating to detect new status format.

This commit is contained in:
David Jay
2016-12-08 13:25:18 -05:00
parent 8446c49c14
commit 6d701ef49e
2 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ class CommentBox extends Component {
.then((postedComment) => {
const commentId = postedComment.id;
const status = postedComment.status;
if (status === 'rejected') {
if (status[0] && status[0].type === 'rejected') {
addNotification('error', lang.t('comment-post-banned-word'));
} else if (premod === 'pre') {
addNotification('success', lang.t('comment-post-notif-premod'));
-1
View File
@@ -95,7 +95,6 @@ router.post('/', wordlist.filter('body'), (req, res, next) => {
author_id: req.user.id
}))
.then((comment) => {
// The comment was created! Send back the created comment.
res.status(201).send(comment);
})