mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 05:27:14 -04:00
models: customFields: fix GET api
Calling GET on /api/board/XXXX/customfields returns a 500 error: TypeError: Converting circular structure to JSON
This commit is contained in:
parent
9aa5584c9c
commit
53c8e63a09
1 changed files with 7 additions and 1 deletions
|
@ -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,
|
||||
};
|
||||
}),
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue