Merge pull request #2610 from JimCircadian/custom-field-api-insert

Updated insert action for CustomFields API
reviewable/pr2615/r1^2
Lauri Ojansivu 6 years ago committed by GitHub
commit 6d47c2e568
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      models/customFields.js

@ -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({

Loading…
Cancel
Save