mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
⚡ Move options around and also allow no data for last node
This commit is contained in:
@@ -85,7 +85,7 @@ export class Webhook implements INodeType {
|
||||
isFullPath: true,
|
||||
responseCode: '={{$parameter["responseCode"]}}',
|
||||
responseMode: '={{$parameter["responseMode"]}}',
|
||||
responseData: '={{$parameter["responseData"]}}',
|
||||
responseData: '={{$parameter["responseData"] || ($parameter.options.noResponseBody ? "noData" : undefined) }}',
|
||||
responseBinaryPropertyName: '={{$parameter["responseBinaryPropertyName"]}}',
|
||||
responseContentType: '={{$parameter["options"]["responseContentType"]}}',
|
||||
responsePropertyName: '={{$parameter["options"]["responsePropertyName"]}}',
|
||||
@@ -165,11 +165,6 @@ export class Webhook implements INodeType {
|
||||
value: 'responseNode',
|
||||
description: 'Response defined in that node',
|
||||
},
|
||||
{
|
||||
name: 'No Body Response',
|
||||
value: 'noBodyResponse',
|
||||
description: 'Returns data without a body',
|
||||
},
|
||||
],
|
||||
default: 'onReceived',
|
||||
description: 'When and how to respond to the webhook.',
|
||||
@@ -232,6 +227,11 @@ export class Webhook implements INodeType {
|
||||
value: 'firstEntryBinary',
|
||||
description: 'Returns the binary data of the first entry of the last node. Always returns a binary file.',
|
||||
},
|
||||
{
|
||||
name: 'No Response Body',
|
||||
value: 'noData',
|
||||
description: 'Returns without a body.',
|
||||
},
|
||||
],
|
||||
default: 'firstEntryJson',
|
||||
description: 'What data should be returned. If it should return all items as an array or only the first item as object.',
|
||||
@@ -296,6 +296,42 @@ export class Webhook implements INodeType {
|
||||
default: false,
|
||||
description: 'Set to true to ignore requests from bots like link previewers and web crawlers',
|
||||
},
|
||||
{
|
||||
displayName: 'No Response Body',
|
||||
name: 'noResponseBody',
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Do not send any body in the response',
|
||||
displayOptions: {
|
||||
hide: {
|
||||
'rawBody': [
|
||||
true,
|
||||
],
|
||||
},
|
||||
show: {
|
||||
'/responseMode': [
|
||||
'onReceived',
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Raw Body',
|
||||
name: 'rawBody',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
hide: {
|
||||
binaryData: [
|
||||
true,
|
||||
],
|
||||
'noResponseBody': [
|
||||
true,
|
||||
],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Raw body (binary)',
|
||||
},
|
||||
{
|
||||
displayName: 'Response Data',
|
||||
name: 'responseData',
|
||||
@@ -306,6 +342,11 @@ export class Webhook implements INodeType {
|
||||
'onReceived',
|
||||
],
|
||||
},
|
||||
hide: {
|
||||
'noResponseBody': [
|
||||
true,
|
||||
],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
placeholder: 'success',
|
||||
@@ -379,20 +420,6 @@ export class Webhook implements INodeType {
|
||||
default: 'data',
|
||||
description: 'Name of the property to return the data of instead of the whole JSON.',
|
||||
},
|
||||
{
|
||||
displayName: 'Raw Body',
|
||||
name: 'rawBody',
|
||||
type: 'boolean',
|
||||
displayOptions: {
|
||||
hide: {
|
||||
binaryData: [
|
||||
true,
|
||||
],
|
||||
},
|
||||
},
|
||||
default: false,
|
||||
description: 'Raw body (binary)',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user