remove redundant endpoint

This commit is contained in:
Riley Davis
2016-12-14 13:53:07 -07:00
parent a072601c3e
commit a6fdd2e46b
3 changed files with 7 additions and 16 deletions
+2 -2
View File
@@ -31,8 +31,8 @@ export const saveBio = (user_id, formData) => dispatch => {
export const fetchCommentsByUserId = userId => {
return (dispatch) => {
dispatch({type: actions.REQUEST_COMMENTS_BY_USER});
return coralApi(`/comments/user/${userId}`)
.then(comments => {
return coralApi(`/comments?user_id${userId}`)
.then(({comments}) => {
comments.forEach(comment => {
dispatch(addItem(comment, 'comments'));
});