Pass the topLevelCommentId to make sure nested comment deleting works

This commit is contained in:
Paul Kaplan 2018-10-09 10:15:08 -04:00
parent e29caceb6b
commit c622d52396

View file

@ -611,7 +611,7 @@ module.exports.updateProject = (id, jsonData, username, token) => (dispatch => {
});
});
module.exports.deleteComment = (projectId, commentId, token) => (dispatch => {
module.exports.deleteComment = (projectId, commentId, topLevelCommentId, token) => (dispatch => {
/* TODO fetching/fetched/error states updates for comment deleting */
api({
uri: `/proxy/comments/project/${projectId}`,
@ -627,7 +627,7 @@ module.exports.deleteComment = (projectId, commentId, token) => (dispatch => {
log.error(err || res.body);
return;
}
dispatch(module.exports.setCommentDeleted(commentId));
dispatch(module.exports.setCommentDeleted(commentId, topLevelCommentId));
});
});