diff --git a/.gitignore b/.gitignore index 602e2e3..7c1dd9f 100644 --- a/.gitignore +++ b/.gitignore @@ -29,7 +29,7 @@ lerna-debug.log* # IDE - VSCode .vscode/* -!.vscode/settings.json +#!.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json diff --git a/src/clients/auth/client.config.ts b/src/clients/auth/client.config.ts index 5a830db..f5c11bf 100644 --- a/src/clients/auth/client.config.ts +++ b/src/clients/auth/client.config.ts @@ -10,7 +10,7 @@ export class AuthClient { options: { url: process.env.DUC_URL, package: DucPackages, - credentials: credentials.createSsl(), + // credentials: credentials.createSsl(), protoPath: DucProtoFilePath, loader: { enums: String, diff --git a/src/clients/pipelines/client.config.ts b/src/clients/pipelines/client.config.ts index aeb4402..b68feeb 100644 --- a/src/clients/pipelines/client.config.ts +++ b/src/clients/pipelines/client.config.ts @@ -12,7 +12,7 @@ export class PipelinesClientConfiguration { options: { url: process.env.PIFACTORY_URL, package: PipelinePackages, - credentials: credentials.createSsl(), + // credentials: credentials.createSsl(), protoPath: PipelineProtoFilePath, loader: { enums: String, diff --git a/src/clients/pipelines/client.service.ts b/src/clients/pipelines/client.service.ts index 198f37b..29a4969 100644 --- a/src/clients/pipelines/client.service.ts +++ b/src/clients/pipelines/client.service.ts @@ -61,7 +61,7 @@ export class PipelinesClientService implements OnModuleInit { const findAllPipelineResponse = await new Promise((resolve, reject) => { this.pipelineService.FindAll(objectSnakeToCamel(data)).subscribe({ next(x) { - resolve(x); + resolve(x.pipelines); }, error(err) { console.log('Observable Error'); diff --git a/src/modules/pipelines/pipelines.service.ts b/src/modules/pipelines/pipelines.service.ts index a441f8f..4755a00 100644 --- a/src/modules/pipelines/pipelines.service.ts +++ b/src/modules/pipelines/pipelines.service.ts @@ -8,7 +8,7 @@ export class PipelinesService { constructor(private pipelineClient: PipelinesClientService) {} adjustPayload(payload) { - payload.input = payload.input.input_s3 || payload.input.input_jdbc; + payload.input = payload.input?.input_s3 || payload.input?.input_jdbc; } async create(createPipelineDto) { @@ -18,7 +18,7 @@ export class PipelinesService { ); const pipeline = objectCamelToSnake(createPipelineResponse); - this.adjustPayload(pipeline); + this.adjustPayload(pipeline.pipeline); return pipeline; } catch (err) { @@ -32,7 +32,7 @@ export class PipelinesService { const findOnePipelineResponse = await this.pipelineClient.findOne(data); const pipeline = objectCamelToSnake(findOnePipelineResponse); - this.adjustPayload(pipeline); + this.adjustPayload(pipeline.pipeline); return pipeline; } catch (err) { @@ -48,7 +48,7 @@ export class PipelinesService { pipelines.forEach((pipeline) => { this.adjustPayload(pipeline); }); - return pipelines; + return { pipelines }; } catch (err) { throw new HttpException(err.message, HttpStatus.NOT_FOUND); }