mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
fix(Trello Node): Use body for POST requests (#10189)
This commit is contained in:
parent
3eac673b17
commit
7775d5059b
|
@ -224,11 +224,11 @@ export class Trello implements INodeType {
|
|||
requestMethod = 'POST';
|
||||
endpoint = 'boards';
|
||||
|
||||
qs.name = this.getNodeParameter('name', i) as string;
|
||||
qs.desc = this.getNodeParameter('description', i) as string;
|
||||
body.name = this.getNodeParameter('name', i) as string;
|
||||
body.desc = this.getNodeParameter('description', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(qs, additionalFields);
|
||||
Object.assign(body, additionalFields);
|
||||
} else if (operation === 'delete') {
|
||||
// ----------------------------------
|
||||
// delete
|
||||
|
@ -350,13 +350,13 @@ export class Trello implements INodeType {
|
|||
requestMethod = 'POST';
|
||||
endpoint = 'cards';
|
||||
|
||||
qs.idList = this.getNodeParameter('listId', i) as string;
|
||||
body.idList = this.getNodeParameter('listId', i) as string;
|
||||
|
||||
qs.name = this.getNodeParameter('name', i) as string;
|
||||
qs.desc = this.getNodeParameter('description', i) as string;
|
||||
body.name = this.getNodeParameter('name', i) as string;
|
||||
body.desc = this.getNodeParameter('description', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(qs, additionalFields);
|
||||
Object.assign(body, additionalFields);
|
||||
} else if (operation === 'delete') {
|
||||
// ----------------------------------
|
||||
// delete
|
||||
|
@ -410,7 +410,7 @@ export class Trello implements INodeType {
|
|||
extractValue: true,
|
||||
}) as string;
|
||||
|
||||
qs.text = this.getNodeParameter('text', i) as string;
|
||||
body.text = this.getNodeParameter('text', i) as string;
|
||||
|
||||
requestMethod = 'POST';
|
||||
|
||||
|
@ -472,12 +472,12 @@ export class Trello implements INodeType {
|
|||
requestMethod = 'POST';
|
||||
endpoint = 'lists';
|
||||
|
||||
qs.idBoard = this.getNodeParameter('idBoard', i) as string;
|
||||
body.idBoard = this.getNodeParameter('idBoard', i) as string;
|
||||
|
||||
qs.name = this.getNodeParameter('name', i) as string;
|
||||
body.name = this.getNodeParameter('name', i) as string;
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(qs, additionalFields);
|
||||
Object.assign(body, additionalFields);
|
||||
} else if (operation === 'get') {
|
||||
// ----------------------------------
|
||||
// get
|
||||
|
@ -563,12 +563,12 @@ export class Trello implements INodeType {
|
|||
|
||||
const url = this.getNodeParameter('url', i) as string;
|
||||
|
||||
Object.assign(qs, {
|
||||
Object.assign(body, {
|
||||
url,
|
||||
});
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(qs, additionalFields);
|
||||
Object.assign(body, additionalFields);
|
||||
|
||||
endpoint = `cards/${cardId}/attachments`;
|
||||
} else if (operation === 'delete') {
|
||||
|
@ -638,10 +638,10 @@ export class Trello implements INodeType {
|
|||
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
|
||||
Object.assign(qs, { name });
|
||||
Object.assign(body, { name });
|
||||
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(qs, additionalFields);
|
||||
Object.assign(body, additionalFields);
|
||||
|
||||
endpoint = `cards/${cardId}/checklists`;
|
||||
} else if (operation === 'delete') {
|
||||
|
@ -716,7 +716,7 @@ export class Trello implements INodeType {
|
|||
|
||||
const name = this.getNodeParameter('name', i) as string;
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||
Object.assign(qs, { name, ...additionalFields });
|
||||
Object.assign(body, { name, ...additionalFields });
|
||||
} else if (operation === 'deleteCheckItem') {
|
||||
// ----------------------------------
|
||||
// deleteCheckItem
|
||||
|
@ -785,7 +785,7 @@ export class Trello implements INodeType {
|
|||
const name = this.getNodeParameter('name', i) as string;
|
||||
const color = this.getNodeParameter('color', i) as string;
|
||||
|
||||
Object.assign(qs, {
|
||||
Object.assign(body, {
|
||||
idBoard,
|
||||
name,
|
||||
color,
|
||||
|
@ -857,7 +857,7 @@ export class Trello implements INodeType {
|
|||
|
||||
const id = this.getNodeParameter('id', i) as string;
|
||||
|
||||
qs.value = id;
|
||||
body.value = id;
|
||||
|
||||
endpoint = `/cards/${cardId}/idLabels`;
|
||||
} else if (operation === 'removeLabel') {
|
||||
|
|
Loading…
Reference in a new issue