mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 16:00:13 +01:00
Updated insert action for CustomFields API
This commit is contained in:
parent
db1cf5bb64
commit
851246a59b
1 changed files with 2 additions and 1 deletions
|
|
@ -302,6 +302,7 @@ if (Meteor.isServer) {
|
||||||
) {
|
) {
|
||||||
Authentication.checkUserId(req.userId);
|
Authentication.checkUserId(req.userId);
|
||||||
const paramBoardId = req.params.boardId;
|
const paramBoardId = req.params.boardId;
|
||||||
|
const board = Boards.findOne({ _id: paramBoardId });
|
||||||
const id = CustomFields.direct.insert({
|
const id = CustomFields.direct.insert({
|
||||||
name: req.body.name,
|
name: req.body.name,
|
||||||
type: req.body.type,
|
type: req.body.type,
|
||||||
|
|
@ -309,7 +310,7 @@ if (Meteor.isServer) {
|
||||||
showOnCard: req.body.showOnCard,
|
showOnCard: req.body.showOnCard,
|
||||||
automaticallyOnCard: req.body.automaticallyOnCard,
|
automaticallyOnCard: req.body.automaticallyOnCard,
|
||||||
showLabelOnMiniCard: req.body.showLabelOnMiniCard,
|
showLabelOnMiniCard: req.body.showLabelOnMiniCard,
|
||||||
boardIds: { $in: [paramBoardId] },
|
boardIds: [board._id],
|
||||||
});
|
});
|
||||||
|
|
||||||
const customField = CustomFields.findOne({
|
const customField = CustomFields.findOne({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue