mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 05:17:28 -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';
|
requestMethod = 'POST';
|
||||||
endpoint = 'boards';
|
endpoint = 'boards';
|
||||||
|
|
||||||
qs.name = this.getNodeParameter('name', i) as string;
|
body.name = this.getNodeParameter('name', i) as string;
|
||||||
qs.desc = this.getNodeParameter('description', i) as string;
|
body.desc = this.getNodeParameter('description', i) as string;
|
||||||
|
|
||||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||||
Object.assign(qs, additionalFields);
|
Object.assign(body, additionalFields);
|
||||||
} else if (operation === 'delete') {
|
} else if (operation === 'delete') {
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
// delete
|
// delete
|
||||||
|
@ -350,13 +350,13 @@ export class Trello implements INodeType {
|
||||||
requestMethod = 'POST';
|
requestMethod = 'POST';
|
||||||
endpoint = 'cards';
|
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;
|
body.name = this.getNodeParameter('name', i) as string;
|
||||||
qs.desc = this.getNodeParameter('description', i) as string;
|
body.desc = this.getNodeParameter('description', i) as string;
|
||||||
|
|
||||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||||
Object.assign(qs, additionalFields);
|
Object.assign(body, additionalFields);
|
||||||
} else if (operation === 'delete') {
|
} else if (operation === 'delete') {
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
// delete
|
// delete
|
||||||
|
@ -410,7 +410,7 @@ export class Trello implements INodeType {
|
||||||
extractValue: true,
|
extractValue: true,
|
||||||
}) as string;
|
}) as string;
|
||||||
|
|
||||||
qs.text = this.getNodeParameter('text', i) as string;
|
body.text = this.getNodeParameter('text', i) as string;
|
||||||
|
|
||||||
requestMethod = 'POST';
|
requestMethod = 'POST';
|
||||||
|
|
||||||
|
@ -472,12 +472,12 @@ export class Trello implements INodeType {
|
||||||
requestMethod = 'POST';
|
requestMethod = 'POST';
|
||||||
endpoint = 'lists';
|
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);
|
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||||
Object.assign(qs, additionalFields);
|
Object.assign(body, additionalFields);
|
||||||
} else if (operation === 'get') {
|
} else if (operation === 'get') {
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
// get
|
// get
|
||||||
|
@ -563,12 +563,12 @@ export class Trello implements INodeType {
|
||||||
|
|
||||||
const url = this.getNodeParameter('url', i) as string;
|
const url = this.getNodeParameter('url', i) as string;
|
||||||
|
|
||||||
Object.assign(qs, {
|
Object.assign(body, {
|
||||||
url,
|
url,
|
||||||
});
|
});
|
||||||
|
|
||||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||||
Object.assign(qs, additionalFields);
|
Object.assign(body, additionalFields);
|
||||||
|
|
||||||
endpoint = `cards/${cardId}/attachments`;
|
endpoint = `cards/${cardId}/attachments`;
|
||||||
} else if (operation === 'delete') {
|
} else if (operation === 'delete') {
|
||||||
|
@ -638,10 +638,10 @@ export class Trello implements INodeType {
|
||||||
|
|
||||||
const name = this.getNodeParameter('name', i) as string;
|
const name = this.getNodeParameter('name', i) as string;
|
||||||
|
|
||||||
Object.assign(qs, { name });
|
Object.assign(body, { name });
|
||||||
|
|
||||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||||
Object.assign(qs, additionalFields);
|
Object.assign(body, additionalFields);
|
||||||
|
|
||||||
endpoint = `cards/${cardId}/checklists`;
|
endpoint = `cards/${cardId}/checklists`;
|
||||||
} else if (operation === 'delete') {
|
} else if (operation === 'delete') {
|
||||||
|
@ -716,7 +716,7 @@ export class Trello implements INodeType {
|
||||||
|
|
||||||
const name = this.getNodeParameter('name', i) as string;
|
const name = this.getNodeParameter('name', i) as string;
|
||||||
const additionalFields = this.getNodeParameter('additionalFields', i);
|
const additionalFields = this.getNodeParameter('additionalFields', i);
|
||||||
Object.assign(qs, { name, ...additionalFields });
|
Object.assign(body, { name, ...additionalFields });
|
||||||
} else if (operation === 'deleteCheckItem') {
|
} else if (operation === 'deleteCheckItem') {
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
// deleteCheckItem
|
// deleteCheckItem
|
||||||
|
@ -785,7 +785,7 @@ export class Trello implements INodeType {
|
||||||
const name = this.getNodeParameter('name', i) as string;
|
const name = this.getNodeParameter('name', i) as string;
|
||||||
const color = this.getNodeParameter('color', i) as string;
|
const color = this.getNodeParameter('color', i) as string;
|
||||||
|
|
||||||
Object.assign(qs, {
|
Object.assign(body, {
|
||||||
idBoard,
|
idBoard,
|
||||||
name,
|
name,
|
||||||
color,
|
color,
|
||||||
|
@ -857,7 +857,7 @@ export class Trello implements INodeType {
|
||||||
|
|
||||||
const id = this.getNodeParameter('id', i) as string;
|
const id = this.getNodeParameter('id', i) as string;
|
||||||
|
|
||||||
qs.value = id;
|
body.value = id;
|
||||||
|
|
||||||
endpoint = `/cards/${cardId}/idLabels`;
|
endpoint = `/cards/${cardId}/idLabels`;
|
||||||
} else if (operation === 'removeLabel') {
|
} else if (operation === 'removeLabel') {
|
||||||
|
|
Loading…
Reference in a new issue