Addressing issue when deleting actions.

This commit is contained in:
David Jay
2016-11-15 14:46:08 -05:00
parent a886123c62
commit d1ea85468e
2 changed files with 3 additions and 3 deletions
@@ -248,8 +248,7 @@ export function deleteAction (item_id, action_type, user_id, item_type) {
return () => {
const action = {
action_type,
user_id,
item_id
user_id
};
return fetch(`/api/v1/${item_type}/${item_id}/actions`, getInit('DELETE', action))
+2 -1
View File
@@ -134,8 +134,9 @@ router.delete('/:comment_id', (req, res, next) => {
});
router.delete('/:comment_id/actions', (req, res, next) => {
console.log(req.params);
Comment
.removeAction(req.params.item_id, req.body.user_id, req.body.action_type)
.removeAction(req.params.comment_id, req.body.user_id, req.body.action_type)
.then(() => {
res.status(201).send({});
})