mirror of
https://github.com/dadosfera/maestro.git
synced 2026-08-31 19:58:21 +00:00
FIX: adjusting pipeline payload fixed
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user