Fix indentation issues

This commit is contained in:
trojanh 2020-01-17 20:16:13 +05:30
parent 6510bb2da7
commit 89b9d7f076

View file

@ -50,11 +50,11 @@ export class Trello implements INodeType {
{ {
name: 'List', name: 'List',
value: 'list', value: 'list',
}, },
{ {
name: "Attachment", name: "Attachment",
value: "attachment" value: "attachment"
} }
], ],
default: 'card', default: 'card',
description: 'The resource to operate on.', description: 'The resource to operate on.',
@ -548,11 +548,11 @@ export class Trello implements INodeType {
name: 'Update', name: 'Update',
value: 'update', value: 'update',
description: 'Update a card', description: 'Update a card',
}, },
], ],
default: 'create', default: 'create',
description: 'The operation to perform.', description: 'The operation to perform.',
}, },
// ---------------------------------- // ----------------------------------
// card:create // card:create
@ -1215,11 +1215,11 @@ export class Trello implements INodeType {
description: 'Whether the acting user is subscribed to the list.', description: 'Whether the acting user is subscribed to the list.',
}, },
], ],
}, },
// ---------------------------------- // ----------------------------------
// attachment // attachment
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Operation', displayName: 'Operation',
name: 'operation', name: 'operation',
@ -1232,7 +1232,7 @@ export class Trello implements INodeType {
}, },
}, },
options: [ options: [
{ {
name: 'Create', name: 'Create',
value: 'create', value: 'create',
description: 'Create a new board', description: 'Create a new board',
@ -1242,22 +1242,22 @@ export class Trello implements INodeType {
value: 'delete', value: 'delete',
description: 'Delete a board', description: 'Delete a board',
}, },
{ {
name: 'Get', name: 'Get',
value: 'get', value: 'get',
description: 'Get the data of an attachments', description: 'Get the data of an attachments',
}, },
{ {
name: 'List', name: 'List',
value: 'list', value: 'list',
description: 'List all attachments for the card', description: 'List all attachments for the card',
} }
], ],
default: 'list', default: 'list',
description: 'The operation to perform.', description: 'The operation to perform.',
}, },
// ---------------------------------- // ----------------------------------
// attachment:create // attachment:create
// ---------------------------------- // ----------------------------------
{ {
@ -1277,8 +1277,8 @@ export class Trello implements INodeType {
}, },
}, },
description: 'The ID of the Card to get attachment.', description: 'The ID of the Card to get attachment.',
}, },
{ {
displayName: 'Attachment URL', displayName: 'Attachment URL',
name: 'url', name: 'url',
type: 'string', type: 'string',
@ -1295,8 +1295,8 @@ export class Trello implements INodeType {
}, },
}, },
description: 'The ID of the attachment to get.', description: 'The ID of the attachment to get.',
}, },
{ {
displayName: 'Attachment Name', displayName: 'Attachment Name',
name: 'name', name: 'name',
type: 'string', type: 'string',
@ -1312,8 +1312,8 @@ export class Trello implements INodeType {
}, },
}, },
description: 'The ID of the attachment to get.', description: 'The ID of the attachment to get.',
}, },
{ {
displayName: 'Attachment mimeType', displayName: 'Attachment mimeType',
name: 'mimeType', name: 'mimeType',
type: 'string', type: 'string',
@ -1329,12 +1329,12 @@ export class Trello implements INodeType {
}, },
}, },
description: 'The ID of the attachment to get.', description: 'The ID of the attachment to get.',
}, },
// ---------------------------------- // ----------------------------------
// attachment:delete // attachment:delete
// ---------------------------------- // ----------------------------------
{ {
displayName: 'Card ID', displayName: 'Card ID',
name: 'cardId', name: 'cardId',
type: 'string', type: 'string',
@ -1351,8 +1351,8 @@ export class Trello implements INodeType {
}, },
}, },
description: 'The ID of the Card to get attachments.', description: 'The ID of the Card to get attachments.',
}, },
{ {
displayName: 'Attachment ID', displayName: 'Attachment ID',
name: 'id', name: 'id',
type: 'string', type: 'string',
@ -1369,9 +1369,9 @@ export class Trello implements INodeType {
}, },
}, },
description: 'The ID of the attachment to get.', description: 'The ID of the attachment to get.',
}, },
// ---------------------------------- // ----------------------------------
// attachment:list // attachment:list
// ---------------------------------- // ----------------------------------
{ {
@ -1391,8 +1391,8 @@ export class Trello implements INodeType {
}, },
}, },
description: 'The ID of the Card to get attachments.', description: 'The ID of the Card to get attachments.',
}, },
{ {
displayName: 'Additional Fields', displayName: 'Additional Fields',
name: 'additionalFields', name: 'additionalFields',
type: 'collection', type: 'collection',
@ -1417,9 +1417,9 @@ export class Trello implements INodeType {
description: 'Fields to return. Either "all" or a comma-separated list of fields.', description: 'Fields to return. Either "all" or a comma-separated list of fields.',
}, },
], ],
}, },
// ---------------------------------- // ----------------------------------
// attachment:get // attachment:get
// ---------------------------------- // ----------------------------------
{ {
@ -1439,8 +1439,8 @@ export class Trello implements INodeType {
}, },
}, },
description: 'The ID of the Card to get attachment.', description: 'The ID of the Card to get attachment.',
}, },
{ {
displayName: 'Attachment ID', displayName: 'Attachment ID',
name: 'id', name: 'id',
type: 'string', type: 'string',
@ -1457,8 +1457,8 @@ export class Trello implements INodeType {
}, },
}, },
description: 'The ID of the attachment to get.', description: 'The ID of the attachment to get.',
}, },
{ {
displayName: 'Additional Fields', displayName: 'Additional Fields',
name: 'additionalFields', name: 'additionalFields',
type: 'collection', type: 'collection',
@ -1692,70 +1692,70 @@ export class Trello implements INodeType {
throw new Error(`The operation "${operation}" is not known!`); throw new Error(`The operation "${operation}" is not known!`);
} }
} else if (resource === 'attachment') { } else if (resource === 'attachment') {
if (operation === 'create') { if (operation === 'create') {
// ---------------------------------- // ----------------------------------
// create // create
// ---------------------------------- // ----------------------------------
requestMethod = 'POST'; requestMethod = 'POST';
const cardId = this.getNodeParameter('cardId', i) as string; const cardId = this.getNodeParameter('cardId', i) as string;
const name = this.getNodeParameter('name', i) as string; const name = this.getNodeParameter('name', i) as string;
const url = this.getNodeParameter('url', i) as string; const url = this.getNodeParameter('url', i) as string;
const mimeType = this.getNodeParameter('mimeType', i) as string; const mimeType = this.getNodeParameter('mimeType', i) as string;
endpoint = `cards/${cardId}/attachments`; endpoint = `cards/${cardId}/attachments`;
Object.assign(qs, { Object.assign(qs, {
name, name,
mimeType, mimeType,
url url
}); });
} else if (operation === 'delete') { } else if (operation === 'delete') {
// ---------------------------------- // ----------------------------------
// delete // delete
// ---------------------------------- // ----------------------------------
requestMethod = 'DELETE'; requestMethod = 'DELETE';
const cardId = this.getNodeParameter('cardId', i) as string; const cardId = this.getNodeParameter('cardId', i) as string;
const id = this.getNodeParameter('id', i) as string; const id = this.getNodeParameter('id', i) as string;
endpoint = `cards/${cardId}/attachments/${id}`; endpoint = `cards/${cardId}/attachments/${id}`;
} else if (operation === 'get') { } else if (operation === 'get') {
// ---------------------------------- // ----------------------------------
// get // get
// ---------------------------------- // ----------------------------------
requestMethod = 'GET'; requestMethod = 'GET';
const cardId = this.getNodeParameter('cardId', i) as string; const cardId = this.getNodeParameter('cardId', i) as string;
const id = this.getNodeParameter('id', i) as string; const id = this.getNodeParameter('id', i) as string;
endpoint = `cards/${cardId}/attachments/${id}`; endpoint = `cards/${cardId}/attachments/${id}`;
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject; const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
Object.assign(qs, additionalFields); Object.assign(qs, additionalFields);
} else if (operation === 'list') { } else if (operation === 'list') {
// ---------------------------------- // ----------------------------------
// list // list
// ---------------------------------- // ----------------------------------
requestMethod = 'GET'; requestMethod = 'GET';
const cardId = this.getNodeParameter('cardId', i) as string; const cardId = this.getNodeParameter('cardId', i) as string;
endpoint = `cards/${cardId}/attachments`; endpoint = `cards/${cardId}/attachments`;
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject; const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
Object.assign(qs, additionalFields); Object.assign(qs, additionalFields);
} else { } else {
throw new Error(`The operation "${operation}" is not known!`); throw new Error(`The operation "${operation}" is not known!`);
} }
} else { } else {
throw new Error(`The resource "${resource}" is not known!`); throw new Error(`The resource "${resource}" is not known!`);
} }