Recursively parse layouts inside folders

Sort layouts by name
Fix credentials
This commit is contained in:
Romain Dunand
2019-12-01 13:00:21 +01:00
parent b4c3642dcc
commit 7e8ecdd9cc
3 changed files with 29 additions and 15 deletions

View File

@@ -676,20 +676,14 @@ export class FileMaker implements INodeType {
// Get all the available topics to display them to user so that he can
// select them easily
async getLayouts(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
const returnData: INodePropertyOptions[] = [];
let returnData: INodePropertyOptions[];
let layouts;
try {
layouts = await layoutsApiRequest.call(this);
returnData = await layoutsApiRequest.call(this);
} catch (err) {
throw new Error(`FileMaker Error: ${err}`);
}
for (const layout of layouts) {
returnData.push({
name: layout.name,
value: layout.name,
});
}
return returnData;
},
async getResponseLayouts(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {