summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorThomas Liske <thomas@fiasko-nw.net>2019-11-04 06:08:40 +0100
committerThomas Liske <thomas@fiasko-nw.net>2019-11-04 06:08:40 +0100
commitb7492e4a11f90326f33080344eb04b5d8a4a472b (patch)
tree69f0a2230238daeb0ba40f1000221365893b5999 /models
parent32ce2b51d8bff5e8851732394a8bae3c56f8b0b6 (diff)
downloadwekan-b7492e4a11f90326f33080344eb04b5d8a4a472b.tar.gz
wekan-b7492e4a11f90326f33080344eb04b5d8a4a472b.tar.bz2
wekan-b7492e4a11f90326f33080344eb04b5d8a4a472b.zip
REST API: fix deletion of a single board card (closes wekan#2624)
Diffstat (limited to 'models')
-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,