summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2018-05-03 09:20:01 +0300
committerGitHub <noreply@github.com>2018-05-03 09:20:01 +0300
commite576e0f9cfc4f61e54da8920a8e29fe43227c266 (patch)
tree39bfbf58d415d41bcd226ebfefe09ec0d5da7668
parentd77e54fff6dd351c2295cde019946fa74e489507 (diff)
parent83e7e4fb271f52b38b70562410a55d89354269da (diff)
downloadwekan-e576e0f9cfc4f61e54da8920a8e29fe43227c266.tar.gz
wekan-e576e0f9cfc4f61e54da8920a8e29fe43227c266.tar.bz2
wekan-e576e0f9cfc4f61e54da8920a8e29fe43227c266.zip
Merge pull request #1622 from couscous3/patch-2
POST /cards: allow setting card members
-rw-r--r--models/cards.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/models/cards.js b/models/cards.js
index 4a662953..721e1ee7 100644
--- a/models/cards.js
+++ b/models/cards.js
@@ -489,6 +489,7 @@ if (Meteor.isServer) {
const paramBoardId = req.params.boardId;
const paramListId = req.params.listId;
const check = Users.findOne({_id: req.body.authorId});
+ const members = req.body.members || [req.body.authorId];
if (typeof check !== 'undefined') {
const id = Cards.direct.insert({
title: req.body.title,
@@ -498,7 +499,7 @@ if (Meteor.isServer) {
userId: req.body.authorId,
swimlaneId: req.body.swimlaneId,
sort: 0,
- members: [req.body.authorId],
+ members: members,
});
JsonRoutes.sendResult(res, {
code: 200,