Another small improvement to Monday.com Node

This commit is contained in:
Jan Oberhauser 2020-03-28 00:46:35 +01:00
parent 313f642821
commit 30dce29597

View file

@ -127,6 +127,10 @@ export class MondayCom implements INodeType {
}, },
}; };
const boards = await mondayComApiRequestAllItems.call(this, 'data.boards', body); const boards = await mondayComApiRequestAllItems.call(this, 'data.boards', body);
if (boards === undefined) {
return returnData;
}
for (const board of boards) { for (const board of boards) {
const boardName = board.name; const boardName = board.name;
const boardId = board.id; const boardId = board.id;
@ -160,6 +164,10 @@ export class MondayCom implements INodeType {
}, },
}; };
const { data } = await mondayComApiRequest.call(this, body); const { data } = await mondayComApiRequest.call(this, body);
if (data === undefined) {
return returnData;
}
const columns = data.boards[0].columns; const columns = data.boards[0].columns;
for (const column of columns) { for (const column of columns) {
const columnName = column.title; const columnName = column.title;
@ -191,6 +199,10 @@ export class MondayCom implements INodeType {
}, },
}; };
const { data } = await mondayComApiRequest.call(this, body); const { data } = await mondayComApiRequest.call(this, body);
if (data === undefined) {
return returnData;
}
const groups = data.boards[0].groups; const groups = data.boards[0].groups;
for (const group of groups) { for (const group of groups) {
const groupName = group.title; const groupName = group.title;