Fix code indentation in choose-node-method.md (#2840)

Co-authored-by: Nick Veitch <nick.veitch@n8n.io>
This commit is contained in:
김한수(Hansu Kim) 2025-02-18 00:53:36 +09:00 committed by GitHub
parent f41038d0bf
commit c1cd0ca152
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,36 +51,36 @@ export class FriendGrid implements INodeType {
. . .
},
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: [
'contact',
],
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: [
'contact',
],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create a contact',
},
],
default: 'create',
description: 'The operation to perform.',
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create a contact',
},
],
default: 'create',
description: 'The operation to perform.',
},
{
displayName: 'Email',
name: 'email',
. . .
},
{
displayName: 'Additional Fields',
// Sets up optional fields
},
],
{
displayName: 'Email',
name: 'email',
. . .
},
{
displayName: 'Additional Fields',
// Sets up optional fields
},
],
};
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
@ -139,21 +139,21 @@ export class FriendGrid implements INodeType {
. . .
// Set up the basic request configuration
requestDefaults: {
baseURL: 'https://api.sendgrid.com/v3/marketing'
baseURL: 'https://api.sendgrid.com/v3/marketing'
},
properties: [
{
{
displayName: 'Resource',
. . .
},
{
},
{
displayName: 'Operation',
name: 'operation',
type: 'options',
displayOptions: {
show: {
resource: [
'contact',
'contact',
],
},
},
@ -164,41 +164,41 @@ export class FriendGrid implements INodeType {
description: 'Create a contact',
// Add the routing object
routing: {
request: {
request: {
method: 'POST',
url: '=/contacts',
send: {
type: 'body',
properties: {
type: 'body',
properties: {
email: {{$parameter["email"]}}
}
}
}
}
}
},
// Handle the response to contact creation
output: {
postReceive: [
postReceive: [
{
type: 'set',
properties: {
type: 'set',
properties: {
value: '={{ { "success": $response } }}'
}
}
}
]
]
}
},
},
],
default: 'create',
description: 'The operation to perform.',
},
{
},
{
displayName: 'Email',
. . .
},
{
},
{
displayName: 'Additional Fields',
// Sets up optional fields
},
},
],
}
// No execute method needed