Merge pull request #2778 from liske/fixes/rest-deletes-all-cards-2624

REST API: fix deletion of a single board card (closes wekan#2624)
This commit is contained in:
Lauri Ojansivu 2019-11-04 09:51:14 +02:00 committed by GitHub
commit db3476c8ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2398,14 +2398,14 @@ if (Meteor.isServer) {
const paramListId = req.params.listId;
const paramCardId = req.params.cardId;
const card = Cards.findOne({
_id: paramCardId,
});
Cards.direct.remove({
_id: paramCardId,
listId: paramListId,
boardId: paramBoardId,
});
const card = Cards.find({
_id: paramCardId,
});
cardRemover(req.body.authorId, card);
JsonRoutes.sendResult(res, {
code: 200,