summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-11-04 09:51:14 +0200
committerGitHub <noreply@github.com>2019-11-04 09:51:14 +0200
commitdb3476c8ec2ec83a648bf6028df877b4de122ba9 (patch)
tree69f0a2230238daeb0ba40f1000221365893b5999
parent32ce2b51d8bff5e8851732394a8bae3c56f8b0b6 (diff)
parentb7492e4a11f90326f33080344eb04b5d8a4a472b (diff)
downloadwekan-db3476c8ec2ec83a648bf6028df877b4de122ba9.tar.gz
wekan-db3476c8ec2ec83a648bf6028df877b4de122ba9.tar.bz2
wekan-db3476c8ec2ec83a648bf6028df877b4de122ba9.zip
Merge pull request #2778 from liske/fixes/rest-deletes-all-cards-2624
REST API: fix deletion of a single board card (closes wekan#2624)
-rw-r--r--models/cards.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/cards.js b/models/cards.js
index f454c72c..633a3888 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -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,