From 2da157dbb06a415d2ceadf574de1c4bc73d6c024 Mon Sep 17 00:00:00 2001 From: thisNeko Date: Fri, 4 May 2018 14:32:36 +0200 Subject: API Edit Card Labels --- models/cards.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'models/cards.js') 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: { -- cgit v1.2.3-1-g7c22