mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
n8n-3867-progressively-apply-prettier-to-all (#3873)
* 🔨 formatting nodes with prettier
This commit is contained in:
@@ -12,12 +12,10 @@ import {
|
||||
formatSubmission,
|
||||
koBoToolboxApiRequest,
|
||||
loadForms,
|
||||
parseStringList
|
||||
parseStringList,
|
||||
} from './GenericFunctions';
|
||||
|
||||
import {
|
||||
options,
|
||||
} from './Options';
|
||||
import { options } from './Options';
|
||||
|
||||
export class KoBoToolboxTrigger implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
@@ -57,7 +55,8 @@ export class KoBoToolboxTrigger implements INodeType {
|
||||
},
|
||||
required: true,
|
||||
default: '',
|
||||
description: 'Form ID (e.g. aSAvYreNzVEkrWg5Gdcvg). Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
description:
|
||||
'Form ID (e.g. aSAvYreNzVEkrWg5Gdcvg). Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
||||
},
|
||||
{
|
||||
displayName: 'Trigger On',
|
||||
@@ -146,6 +145,7 @@ export class KoBoToolboxTrigger implements INodeType {
|
||||
const req = this.getRequestObject();
|
||||
const formatOptions = this.getNodeParameter('formatOptions') as IDataObject;
|
||||
|
||||
// prettier-ignore
|
||||
const responseData = formatOptions.reformat
|
||||
? formatSubmission(req.body, parseStringList(formatOptions.selectMask as string), parseStringList(formatOptions.numberMask as string))
|
||||
: req.body;
|
||||
@@ -153,16 +153,11 @@ export class KoBoToolboxTrigger implements INodeType {
|
||||
if (formatOptions.download) {
|
||||
// Download related attachments
|
||||
return {
|
||||
workflowData: [
|
||||
[await downloadAttachments.call(this, responseData, formatOptions)],
|
||||
],
|
||||
workflowData: [[await downloadAttachments.call(this, responseData, formatOptions)]],
|
||||
};
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
return {
|
||||
workflowData: [
|
||||
this.helpers.returnJsonArray([responseData]),
|
||||
],
|
||||
workflowData: [this.helpers.returnJsonArray([responseData])],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user