mirror of
https://github.com/wassname/talk.git
synced 2026-07-10 21:44:49 +08:00
Addressing issue when deleting actions.
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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({});
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user