REFACTOR: Project Pattern and AuthClient (DUC)

This commit is contained in:
Victor Radael
2022-03-14 10:35:03 -03:00
parent 2f8d9b9550
commit 363bc8b350
163 changed files with 2544 additions and 4138 deletions
+17
View File
@@ -0,0 +1,17 @@
// import { join } from 'path';
// import { ClientOptions, Transport } from '@nestjs/microservices';
// export const OutputsClientConfiguration: ClientOptions = {
// transport: Transport.GRPC,
// options: {
// //url: `${process.env.USERS_SVC_URL}:${process.env.USERS_SVC_PORT}`,
// url: `127.0.0.1:50053`,
// package: 'output',
// protoPath: join(__dirname, '..', 'proto', 'output.proto'),
// loader: {
// enums: String,
// objects: true,
// arrays: true,
// },
// },
// };
+57
View File
@@ -0,0 +1,57 @@
// import {
// Controller,
// Delete,
// Get,
// OnModuleInit,
// Param,
// Post,
// Put,
// } from '@nestjs/common';
// import {
// Client,
// ClientGrpc,
// MessagePattern,
// Payload,
// } from '@nestjs/microservices';
// import { OutputsService } from './outputs.service';
// import { CreateOutputDto } from './dto/create-output.dto';
// import { UpdateOutputDto } from './dto/update-output.dto';
// import { ApiTags } from '@nestjs/swagger';
// import { GrpcClientConfiguration } from './client.config';
// @Controller('output')
// export class OutputsClientService implements OnModuleInit {
// @Client(GrpcClientConfiguration)
// private outputServiceClient: ClientGrpc;
// private outputService: OutputsService;
// onModuleInit() {
// this.outputService =
// this.outputServiceClient.getService<OutputsService>('OutputService');
// }
// @Post()
// create(@Payload() createOutputDto: CreateOutputDto) {
// return this.outputService.create(createOutputDto);
// }
// @Get()
// list() {
// return this.outputService.list();
// }
// @Get(':id')
// show(@Param() id: string) {
// return this.outputService.show(id);
// }
// @Put(':id')
// update(@Param() id: string, @Payload() updateOutputDto: UpdateOutputDto) {
// return this.outputService.update(id, updateOutputDto);
// }
// @Delete(':id')
// remove(@Param() id: string) {
// return this.outputService.remove(id);
// }
// }