mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
refactor(core): Continue moving typeorm operators to repositories (no-changelog) (#8186)
Follow-up to: #8163
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { flags } from '@oclif/command';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import type { FindOptionsWhere } from 'typeorm';
|
||||
import { Credentials } from 'n8n-core';
|
||||
import type { ICredentialsDb, ICredentialsDecryptedDb } from '@/Interfaces';
|
||||
import { BaseCommand } from '../BaseCommand';
|
||||
@@ -107,13 +106,9 @@ export class ExportCredentialsCommand extends BaseCommand {
|
||||
}
|
||||
}
|
||||
|
||||
const findQuery: FindOptionsWhere<ICredentialsDb> = {};
|
||||
if (flags.id) {
|
||||
findQuery.id = flags.id;
|
||||
}
|
||||
|
||||
const credentials: ICredentialsDb[] =
|
||||
await Container.get(CredentialsRepository).findBy(findQuery);
|
||||
const credentials: ICredentialsDb[] = await Container.get(CredentialsRepository).findBy(
|
||||
flags.id ? { id: flags.id } : {},
|
||||
);
|
||||
|
||||
if (flags.decrypted) {
|
||||
for (let i = 0; i < credentials.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user