mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-07 04:49:08 +00:00
FIX: adjusting pipeline payload fixed
This commit is contained in:
@@ -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