Updated insert action for CustomFields API

This commit is contained in:
James Byrne 2019-08-12 17:47:04 +01:00
parent db1cf5bb64
commit 851246a59b

View file

@ -302,6 +302,7 @@ if (Meteor.isServer) {
) {
Authentication.checkUserId(req.userId);
const paramBoardId = req.params.boardId;
const board = Boards.findOne({ _id: paramBoardId });
const id = CustomFields.direct.insert({
name: req.body.name,
type: req.body.type,
@ -309,7 +310,7 @@ if (Meteor.isServer) {
showOnCard: req.body.showOnCard,
automaticallyOnCard: req.body.automaticallyOnCard,
showLabelOnMiniCard: req.body.showLabelOnMiniCard,
boardIds: { $in: [paramBoardId] },
boardIds: [board._id],
});
const customField = CustomFields.findOne({