diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2018-07-02 18:34:46 +0200 |
---|---|---|
committer | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2018-10-23 18:48:01 +0200 |
commit | 53c8e63a09b513a37d308d2301b2925e239dabfe (patch) | |
tree | d68099448f3330bd1290276fb90f43c629e339c8 /models | |
parent | 9aa5584c9c7a5bf7d9755dd266a0b0035f57ebf0 (diff) | |
download | wekan-53c8e63a09b513a37d308d2301b2925e239dabfe.tar.gz wekan-53c8e63a09b513a37d308d2301b2925e239dabfe.tar.bz2 wekan-53c8e63a09b513a37d308d2301b2925e239dabfe.zip |
models: customFields: fix GET api
Calling GET on /api/board/XXXX/customfields
returns a 500 error:
TypeError: Converting circular structure to JSON
Diffstat (limited to 'models')
-rw-r--r-- | models/customFields.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/models/customFields.js b/models/customFields.js index 38481d8c..203e46d0 100644 --- a/models/customFields.js +++ b/models/customFields.js @@ -87,7 +87,13 @@ if (Meteor.isServer) { const paramBoardId = req.params.boardId; JsonRoutes.sendResult(res, { code: 200, - data: CustomFields.find({ boardId: paramBoardId }), + data: CustomFields.find({ boardId: paramBoardId }).map(function (cf) { + return { + _id: cf._id, + name: cf.name, + type: cf.type, + }; + }), }); }); |