mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 05:17:28 -08:00
👕 Fix lint issue
This commit is contained in:
parent
d726e11af4
commit
a46a6fa00c
|
@ -82,14 +82,7 @@ export function getWorkflowWebhooksBasic(workflow: Workflow): IWebhookData[] {
|
|||
|
||||
const returnData: IWebhookData[] = [];
|
||||
|
||||
let parentNodes: string[] | undefined;
|
||||
|
||||
for (const node of Object.values(workflow.nodes)) {
|
||||
if (parentNodes !== undefined && !parentNodes.includes(node.name)) {
|
||||
// If parentNodes are given check only them if they have webhooks
|
||||
// and no other ones
|
||||
continue;
|
||||
}
|
||||
returnData.push.apply(returnData, NodeHelpers.getNodeWebhooksBasic(workflow, node));
|
||||
}
|
||||
|
||||
|
|
|
@ -6,17 +6,17 @@ import {
|
|||
import * as config from '../../../../config';
|
||||
|
||||
export class CreateIndexStoppedAt1594910478695 implements MigrationInterface {
|
||||
name = 'CreateIndexStoppedAt1594910478695'
|
||||
name = 'CreateIndexStoppedAt1594910478695';
|
||||
|
||||
public async up(queryRunner: MongoQueryRunner): Promise<void> {
|
||||
async up(queryRunner: MongoQueryRunner): Promise<void> {
|
||||
const tablePrefix = config.get('database.tablePrefix');
|
||||
await queryRunner.manager.createCollectionIndex(`${tablePrefix}execution_entity`, 'stoppedAt', { name: `IDX_${tablePrefix}execution_entity_stoppedAt`});
|
||||
}
|
||||
await queryRunner.manager.createCollectionIndex(`${tablePrefix}execution_entity`, 'stoppedAt', { name: `IDX_${tablePrefix}execution_entity_stoppedAt` });
|
||||
}
|
||||
|
||||
public async down(queryRunner: MongoQueryRunner): Promise<void> {
|
||||
async down(queryRunner: MongoQueryRunner): Promise<void> {
|
||||
const tablePrefix = config.get('database.tablePrefix');
|
||||
await queryRunner.manager.dropCollectionIndex
|
||||
(`${tablePrefix}execution_entity`, `IDX_${tablePrefix}execution_entity_stoppedAt`);
|
||||
}
|
||||
(`${tablePrefix}execution_entity`, `IDX_${tablePrefix}execution_entity_stoppedAt`);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
import {MigrationInterface, QueryRunner} from "typeorm";
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
import * as config from '../../../../config';
|
||||
|
||||
export class CreateIndexStoppedAt1594902918301 implements MigrationInterface {
|
||||
name = 'CreateIndexStoppedAt1594902918301'
|
||||
name = 'CreateIndexStoppedAt1594902918301';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
async up(queryRunner: QueryRunner): Promise<void> {
|
||||
const tablePrefix = config.get('database.tablePrefix');
|
||||
|
||||
await queryRunner.query('CREATE INDEX `IDX_' + tablePrefix + 'cefb067df2402f6aed0638a6c1` ON `' + tablePrefix + 'execution_entity` (`stoppedAt`)');
|
||||
}
|
||||
await queryRunner.query('CREATE INDEX `IDX_' + tablePrefix + 'cefb067df2402f6aed0638a6c1` ON `' + tablePrefix + 'execution_entity` (`stoppedAt`)');
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
async down(queryRunner: QueryRunner): Promise<void> {
|
||||
const tablePrefix = config.get('database.tablePrefix');
|
||||
|
||||
await queryRunner.query('DROP INDEX `IDX_' + tablePrefix + 'cefb067df2402f6aed0638a6c1` ON `' + tablePrefix + 'execution_entity`');
|
||||
}
|
||||
await queryRunner.query('DROP INDEX `IDX_' + tablePrefix + 'cefb067df2402f6aed0638a6c1` ON `' + tablePrefix + 'execution_entity`');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import {MigrationInterface, QueryRunner} from "typeorm";
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
import * as config from '../../../../config';
|
||||
|
||||
export class CreateIndexStoppedAt1594828256133 implements MigrationInterface {
|
||||
name = 'CreateIndexStoppedAt1594828256133'
|
||||
name = 'CreateIndexStoppedAt1594828256133';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
async up(queryRunner: QueryRunner): Promise<void> {
|
||||
let tablePrefix = config.get('database.tablePrefix');
|
||||
const tablePrefixPure = tablePrefix;
|
||||
const schema = config.get('database.postgresdb.schema');
|
||||
|
@ -14,12 +14,12 @@ export class CreateIndexStoppedAt1594828256133 implements MigrationInterface {
|
|||
}
|
||||
|
||||
await queryRunner.query(`CREATE INDEX IF NOT EXISTS IDX_${tablePrefixPure}33228da131bb1112247cf52a42 ON ${tablePrefix}execution_entity ("stoppedAt") `);
|
||||
}
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
let tablePrefix = config.get('database.tablePrefix');
|
||||
async down(queryRunner: QueryRunner): Promise<void> {
|
||||
const tablePrefix = config.get('database.tablePrefix');
|
||||
|
||||
await queryRunner.query(`DROP INDEX IDX_${tablePrefix}33228da131bb1112247cf52a42`);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
import {MigrationInterface, QueryRunner} from "typeorm";
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
import * as config from '../../../../config';
|
||||
|
||||
export class CreateIndexStoppedAt1594825041918 implements MigrationInterface {
|
||||
name = 'CreateIndexStoppedAt1594825041918'
|
||||
name = 'CreateIndexStoppedAt1594825041918';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
async up(queryRunner: QueryRunner): Promise<void> {
|
||||
const tablePrefix = config.get('database.tablePrefix');
|
||||
|
||||
await queryRunner.query(`CREATE INDEX "IDX_${tablePrefix}cefb067df2402f6aed0638a6c1" ON "execution_entity" ("stoppedAt") `);
|
||||
}
|
||||
await queryRunner.query(`CREATE INDEX "IDX_${tablePrefix}cefb067df2402f6aed0638a6c1" ON "execution_entity" ("stoppedAt") `);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
async down(queryRunner: QueryRunner): Promise<void> {
|
||||
const tablePrefix = config.get('database.tablePrefix');
|
||||
|
||||
await queryRunner.query(`DROP INDEX "IDX_${tablePrefix}cefb067df2402f6aed0638a6c1"`);
|
||||
}
|
||||
await queryRunner.query(`DROP INDEX "IDX_${tablePrefix}cefb067df2402f6aed0638a6c1"`);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
export * from './1588102412422-InitialMigration';
|
||||
export * from './1592445003908-WebhookModel';
|
||||
export * from './1594825041918-CreateIndexStoppedAt'
|
||||
export * from './1594825041918-CreateIndexStoppedAt';
|
||||
|
|
|
@ -211,12 +211,12 @@ export class QuestDb implements INodeType {
|
|||
// ----------------------------------
|
||||
const tableName = this.getNodeParameter('table', 0) as string;
|
||||
const returnFields = this.getNodeParameter('returnFields', 0) as string;
|
||||
|
||||
let queries : string[] = [];
|
||||
items.map(item => {
|
||||
let columns = Object.keys(item.json);
|
||||
|
||||
let values : string = columns.map((col : string) => {
|
||||
const queries : string[] = [];
|
||||
items.map(item => {
|
||||
const columns = Object.keys(item.json);
|
||||
|
||||
const values : string = columns.map((col : string) => {
|
||||
if (typeof item.json[col] === 'string') {
|
||||
return `\'${item.json[col]}\'`;
|
||||
} else {
|
||||
|
@ -224,13 +224,13 @@ export class QuestDb implements INodeType {
|
|||
}
|
||||
}).join(',');
|
||||
|
||||
let query = `INSERT INTO ${tableName} (${columns.join(',')}) VALUES (${values});`;
|
||||
const query = `INSERT INTO ${tableName} (${columns.join(',')}) VALUES (${values});`;
|
||||
queries.push(query);
|
||||
});
|
||||
|
||||
|
||||
await db.any(pgp.helpers.concat(queries));
|
||||
|
||||
let returnedItems = await db.any(`SELECT ${returnFields} from ${tableName}`);
|
||||
const returnedItems = await db.any(`SELECT ${returnFields} from ${tableName}`);
|
||||
|
||||
returnItems = this.helpers.returnJsonArray(returnedItems as IDataObject[]);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue