mirror of
https://github.com/wassname/talk.git
synced 2026-07-12 18:50:56 +08:00
remove redundant endpoint
This commit is contained in:
@@ -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'));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user