소스 검색

Updated insert action for CustomFields API

James Byrne 5 년 전
부모
커밋
851246a59b
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      models/customFields.js

+ 2 - 1
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({