diff options
author | Thomas Liske <thomas@fiasko-nw.net> | 2019-11-04 06:08:40 +0100 |
---|---|---|
committer | Thomas Liske <thomas@fiasko-nw.net> | 2019-11-04 06:08:40 +0100 |
commit | b7492e4a11f90326f33080344eb04b5d8a4a472b (patch) | |
tree | 69f0a2230238daeb0ba40f1000221365893b5999 /models/cards.js | |
parent | 32ce2b51d8bff5e8851732394a8bae3c56f8b0b6 (diff) | |
download | wekan-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/cards.js')
-rw-r--r-- | models/cards.js | 6 |
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, |