Minor improvements to Trello-Node

This commit is contained in:
Jan Oberhauser 2020-08-25 08:27:26 +02:00
parent 4c075db26c
commit 98edb353d4
5 changed files with 20 additions and 20 deletions

View file

@ -1,6 +1,6 @@
import { import {
INodeProperties, INodeProperties,
} from "n8n-workflow"; } from 'n8n-workflow';
export const attachmentOperations = [ export const attachmentOperations = [
// ---------------------------------- // ----------------------------------

View file

@ -1,6 +1,6 @@
import { import {
INodeProperties, INodeProperties,
} from "n8n-workflow"; } from 'n8n-workflow';
export const boardOperations = [ export const boardOperations = [
// ---------------------------------- // ----------------------------------

View file

@ -1,6 +1,6 @@
import { import {
INodeProperties, INodeProperties,
} from "n8n-workflow"; } from 'n8n-workflow';
export const cardCommentOperations = [ export const cardCommentOperations = [
{ {
@ -16,29 +16,29 @@ export const cardCommentOperations = [
}, },
options: [ options: [
{ {
name: 'Add', name: 'Create',
value: 'add', value: 'create',
description: 'Add a comment to a card', description: 'Create a comment on a card',
}, },
{ {
name: 'Revove', name: 'Delete',
value: 'remove', value: 'delete',
description: 'Remove a comment from a card', description: 'Delete a comment from a card',
}, },
{ {
name: 'Update', name: 'Update',
value: 'update', value: 'update',
description: 'Update a comment in a card', description: 'Update a comment on a card',
}, },
], ],
default: 'add', default: 'create',
description: 'The operation to perform.', description: 'The operation to perform.',
}, },
] as INodeProperties[]; ] as INodeProperties[];
export const cardCommentFields = [ export const cardCommentFields = [
// ---------------------------------- // ----------------------------------
// cardComment:add // cardComment:create
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Card ID', displayName: 'Card ID',
@ -49,7 +49,7 @@ export const cardCommentFields = [
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'add', 'create',
], ],
resource: [ resource: [
'cardComment', 'cardComment',
@ -67,7 +67,7 @@ export const cardCommentFields = [
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'add', 'create',
], ],
resource: [ resource: [
'cardComment', 'cardComment',
@ -89,7 +89,7 @@ export const cardCommentFields = [
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'remove', 'delete',
], ],
resource: [ resource: [
'cardComment', 'cardComment',
@ -107,7 +107,7 @@ export const cardCommentFields = [
displayOptions: { displayOptions: {
show: { show: {
operation: [ operation: [
'remove', 'delete',
], ],
resource: [ resource: [
'cardComment', 'cardComment',

View file

@ -1,6 +1,6 @@
import { import {
INodeProperties, INodeProperties,
} from "n8n-workflow"; } from 'n8n-workflow';
export const cardOperations = [ export const cardOperations = [
// ---------------------------------- // ----------------------------------

View file

@ -276,9 +276,9 @@ export class Trello implements INodeType {
} else if (resource === 'cardComment') { } else if (resource === 'cardComment') {
if (operation === 'add') { if (operation === 'create') {
// ---------------------------------- // ----------------------------------
// add // create
// ---------------------------------- // ----------------------------------
const cardId = this.getNodeParameter('cardId', i) as string; const cardId = this.getNodeParameter('cardId', i) as string;
@ -290,7 +290,7 @@ export class Trello implements INodeType {
endpoint = `cards/${cardId}/actions/comments`; endpoint = `cards/${cardId}/actions/comments`;
} else if (operation === 'remove') { } else if (operation === 'delete') {
// ---------------------------------- // ----------------------------------
// delete // delete
// ---------------------------------- // ----------------------------------