mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-17 16:39:08 +00:00
REFACTOR: Project Pattern and AuthClient (DUC)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// import { join } from 'path';
|
||||
// import { ClientOptions, Transport } from '@nestjs/microservices';
|
||||
|
||||
// export const TransformationsClientConfiguration: ClientOptions = {
|
||||
// transport: Transport.GRPC,
|
||||
// options: {
|
||||
// //url: `${process.env.USERS_SVC_URL}:${process.env.USERS_SVC_PORT}`,
|
||||
// url: `127.0.0.1:50054`,
|
||||
// package: 'transformation',
|
||||
// protoPath: join(__dirname, '..', 'proto', 'transformation.proto'),
|
||||
// loader: {
|
||||
// enums: String,
|
||||
// objects: true,
|
||||
// arrays: true,
|
||||
// },
|
||||
// },
|
||||
// };
|
||||
@@ -0,0 +1,65 @@
|
||||
// import {
|
||||
// Controller,
|
||||
// Delete,
|
||||
// Get,
|
||||
// OnModuleInit,
|
||||
// Param,
|
||||
// Post,
|
||||
// Put,
|
||||
// } from '@nestjs/common';
|
||||
// import {
|
||||
// Client,
|
||||
// ClientGrpc,
|
||||
// MessagePattern,
|
||||
// Payload,
|
||||
// } from '@nestjs/microservices';
|
||||
// import { TransformationsService } from './transformations.service';
|
||||
// import { CreateTransformationDto } from './dto/create-transformation.dto';
|
||||
// import { UpdateTransformationDto } from './dto/update-transformation.dto';
|
||||
// import { ApiTags } from '@nestjs/swagger';
|
||||
// import { GrpcClientConfiguration } from './client.config';
|
||||
|
||||
// @Controller('transformation')
|
||||
// export class TransformationsClientService implements OnModuleInit {
|
||||
// @Client(GrpcClientConfiguration)
|
||||
// private transformationServiceClient: ClientGrpc;
|
||||
|
||||
// private transformationService: TransformationsService;
|
||||
|
||||
// onModuleInit() {
|
||||
// this.transformationService =
|
||||
// this.transformationServiceClient.getService<TransformationsService>(
|
||||
// 'TransformationService',
|
||||
// );
|
||||
// }
|
||||
|
||||
// @Post()
|
||||
// create(@Payload() createTransformationDto: CreateTransformationDto[]) {
|
||||
// return createTransformationDto.map((transf) =>
|
||||
// this.transformationService.create(transf),
|
||||
// );
|
||||
// }
|
||||
|
||||
// @Get()
|
||||
// list() {
|
||||
// return this.transformationService.list();
|
||||
// }
|
||||
|
||||
// @Get(':id')
|
||||
// show(@Payload() id: string) {
|
||||
// return this.transformationService.show(id);
|
||||
// }
|
||||
|
||||
// @Put(':id')
|
||||
// update(
|
||||
// @Param() id: string,
|
||||
// @Payload() updateTransformationDto: UpdateTransformationDto,
|
||||
// ) {
|
||||
// return this.transformationService.update(id, updateTransformationDto);
|
||||
// }
|
||||
|
||||
// @Delete(':id')
|
||||
// remove(@Param() id: string) {
|
||||
// return this.transformationService.remove(id);
|
||||
// }
|
||||
// }
|
||||
Reference in New Issue
Block a user