Merge branch 'on-tests' into ci/cd

This commit is contained in:
Victor Radael
2022-02-08 15:25:54 -03:00
committed by GitHub
18 changed files with 7379 additions and 5782 deletions
+28 -12
View File
@@ -1,21 +1,37 @@
import { Controller, Delete, Get, OnModuleInit, Param, Post, Put } from '@nestjs/common';
import { Client, ClientGrpc, MessagePattern, Payload } from '@nestjs/microservices';
import { PipelineGrpcClientService } from './pipelines.service';
import {
Controller,
Delete,
Get,
OnModuleInit,
Param,
Post,
Put,
} from '@nestjs/common';
import {
Client,
ClientGrpc,
MessagePattern,
Payload,
} from '@nestjs/microservices';
import { PipelinesService } from './pipelines.service';
import { CreatePipelineDto } from './dto/create-pipeline.dto';
import { UpdatePipelineDto } from './dto/update-pipeline.dto';
import { GrpcClientConfiguration } from './config/grpc-client';
@Controller('pipeline')
export class PipelinesController implements OnModuleInit{
export class PipelinesController implements OnModuleInit {
@Client(GrpcClientConfiguration)
private pipelineServiceClient: ClientGrpc;
private pipelineService: PipelineGrpcClientService;
private pipelineService: PipelinesService;
onModuleInit() {
this.pipelineService =
this.pipelineServiceClient.getService<PipelineGrpcClientService>('PipelineService');
this.pipelineServiceClient.getService<PipelinesService>(
'PipelineService',
);
}
@Post()
@@ -34,21 +50,21 @@ export class PipelinesController implements OnModuleInit{
}
@Put(':id')
update(@Param() id:string,@Payload() updatePipelineDto: UpdatePipelineDto) {
update(@Param() id: string, @Payload() updatePipelineDto: UpdatePipelineDto) {
return this.pipelineService.update(id, updatePipelineDto);
}
@Delete()
remove(@Param() id:string) {
remove(@Param() id: string) {
return this.pipelineService.remove(id);
}
@Post()
getPipelineLogsMessages(@Param() id:string,@Payload() details:string){
return this.pipelineService.getPipelineLogsMessages(id,details);
getPipelineLogsMessages(@Param() id: string, @Payload() details: string) {
return this.pipelineService.getPipelineLogsMessages(id, details);
}
getPipelineStatus(id:string){
return this.pipelineService.getPipelineStatus(id)
getPipelineStatus(id: string) {
return this.pipelineService.getPipelineStatus(id);
}
}