mirror of
https://github.com/wekan/wekan.git
synced 2026-02-01 06:01:48 +01:00
Merge pull request #1622 from couscous3/patch-2
POST /cards: allow setting card members
This commit is contained in:
commit
e576e0f9cf
1 changed files with 2 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue