summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthisNeko <faguet.guillaume@gmail.com>2018-05-04 14:32:36 +0200
committerNET\faguet <guillaume.faguet@avisto.com>2018-05-04 14:32:36 +0200
commit2da157dbb06a415d2ceadf574de1c4bc73d6c024 (patch)
treeca0b866cef057c9ecafa63d3671dbc9658aa4a55
parentdcd5af0a76b58611d4a04d1fab69194b0368c9cb (diff)
downloadwekan-2da157dbb06a415d2ceadf574de1c4bc73d6c024.tar.gz
wekan-2da157dbb06a415d2ceadf574de1c4bc73d6c024.tar.bz2
wekan-2da157dbb06a415d2ceadf574de1c4bc73d6c024.zip
API Edit Card Labels
-rw-r--r--models/cards.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/models/cards.js b/models/cards.js
index 721e1ee7..e322dc2e 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -543,6 +543,11 @@ if (Meteor.isServer) {
Cards.direct.update({_id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false},
{$set: {description: newDescription}});
}
+ if (req.body.hasOwnProperty('labelIds')) {
+ const newlabelIds = req.body.labelIds;
+ Cards.direct.update({_id: paramCardId, listId: paramListId, boardId: paramBoardId, archived: false},
+ {$set: {labelIds: newlabelIds}});
+ }
JsonRoutes.sendResult(res, {
code: 200,
data: {