mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-08 17:39:07 +00:00
Created Trigger Pipeline route
This commit is contained in:
@@ -11,15 +11,20 @@ export class TransformationsService {
|
||||
constructor(private transformationClient: TransformationsClientService) {}
|
||||
|
||||
async create(createTransformationDto: ICreateTransformationsRequest) {
|
||||
const { transformations, info } = createTransformationDto;
|
||||
|
||||
if (!transformations || transformations.length == 0) {
|
||||
throw new HttpException('Missing transformations field.', 400);
|
||||
}
|
||||
|
||||
try {
|
||||
const convertedDTO = createTransformationDto.transformations.map((tr) => {
|
||||
const convertedDTO = transformations.map((tr) => {
|
||||
return trSnakeToCamel(tr);
|
||||
});
|
||||
|
||||
const createTransformationResponse =
|
||||
await this.transformationClient.create({
|
||||
transformations: convertedDTO,
|
||||
info: createTransformationDto.info,
|
||||
info: info,
|
||||
});
|
||||
|
||||
return createTransformationResponse;
|
||||
|
||||
Reference in New Issue
Block a user