summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2018-05-04 15:50:00 +0300
committerGitHub <noreply@github.com>2018-05-04 15:50:00 +0300
commitc48c18c4e9c3d86b2ad19c98b24b9240bfb69ffc (patch)
treeca0b866cef057c9ecafa63d3671dbc9658aa4a55
parentdcd5af0a76b58611d4a04d1fab69194b0368c9cb (diff)
parent2da157dbb06a415d2ceadf574de1c4bc73d6c024 (diff)
downloadwekan-c48c18c4e9c3d86b2ad19c98b24b9240bfb69ffc.tar.gz
wekan-c48c18c4e9c3d86b2ad19c98b24b9240bfb69ffc.tar.bz2
wekan-c48c18c4e9c3d86b2ad19c98b24b9240bfb69ffc.zip
Merge pull request #1626 from ThisNeko/devel
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: {