mirror of
https://github.com/wassname/talk.git
synced 2026-07-02 17:24:02 +08:00
Updating to detect new status format.
This commit is contained in:
@@ -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'));
|
||||
|
||||
@@ -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);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user