From 78448b85c180a67f0e64b234146b15630003f6b4 Mon Sep 17 00:00:00 2001 From: David Jay Date: Fri, 9 Dec 2016 15:11:13 -0500 Subject: [PATCH 1/2] Updating to reflect new comment api. --- client/coral-plugin-commentbox/CommentBox.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/coral-plugin-commentbox/CommentBox.js b/client/coral-plugin-commentbox/CommentBox.js index 0167d517f..501d2ecc9 100644 --- a/client/coral-plugin-commentbox/CommentBox.js +++ b/client/coral-plugin-commentbox/CommentBox.js @@ -45,8 +45,7 @@ class CommentBox extends Component { postItem(comment, 'comments') .then((postedComment) => { const commentId = postedComment.id; - const status = postedComment.status; - if (status[0] && status[0].type === 'rejected') { + if (postedComment.status === 'rejected') { addNotification('error', lang.t('comment-post-banned-word')); } else if (premod === 'pre') { addNotification('success', lang.t('comment-post-notif-premod')); From cb576dca8f8355043f43fd42f62966014c2257ec Mon Sep 17 00:00:00 2001 From: David Jay Date: Mon, 12 Dec 2016 15:52:34 -0500 Subject: [PATCH 2/2] Updating signup endpoint to reflect current api. --- client/coral-framework/actions/auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/coral-framework/actions/auth.js b/client/coral-framework/actions/auth.js index d027dcd9e..e64755435 100644 --- a/client/coral-framework/actions/auth.js +++ b/client/coral-framework/actions/auth.js @@ -73,7 +73,7 @@ const signUpFailure = error => ({type: actions.FETCH_SIGNUP_FAILURE, error}); export const fetchSignUp = formData => dispatch => { dispatch(signUpRequest()); - coralApi('/user', {method: 'POST', body: formData}) + coralApi('/users', {method: 'POST', body: formData}) .then(({user}) => { dispatch(signUpSuccess(user)); setTimeout(() =>{