mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-19 09:39:08 +00:00
REFACTOR: Att Functions + Alpha Clients connection
This commit is contained in:
@@ -7,9 +7,9 @@ export class OutputsClientConfiguration {
|
||||
return {
|
||||
transport: Transport.GRPC,
|
||||
options: {
|
||||
url: process.env.OUTFACTORY_URL,
|
||||
url: process.env.OTFACTORY_URL,
|
||||
package: 'output',
|
||||
// credentials: credentials.createSsl(),
|
||||
credentials: credentials.createSsl(),
|
||||
protoPath: OutputProtofile,
|
||||
loader: {
|
||||
enums: String,
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
import {
|
||||
Controller,
|
||||
Delete,
|
||||
Get,
|
||||
Inject,
|
||||
OnModuleInit,
|
||||
Param,
|
||||
Post,
|
||||
Put,
|
||||
OnModuleInit
|
||||
} from '@nestjs/common';
|
||||
import {
|
||||
ClientGrpc,
|
||||
@@ -33,7 +28,7 @@ export class OutputsClientService implements OnModuleInit {
|
||||
console.log('OutputClientService', 'Create');
|
||||
|
||||
const createOutputResponse = await new Promise((resolve, reject) => {
|
||||
this.outputService.create(createOutputDto).subscribe({
|
||||
this.outputService.Create(createOutputDto).subscribe({
|
||||
next(x) {
|
||||
resolve(x);
|
||||
},
|
||||
@@ -51,9 +46,8 @@ export class OutputsClientService implements OnModuleInit {
|
||||
throw new Error(err);
|
||||
});
|
||||
|
||||
const convertedItem = objectCamelToSnake(createOutputResponse["item"])
|
||||
createOutputResponse["item"] = convertedItem
|
||||
|
||||
const convertedItem = objectCamelToSnake(createOutputResponse["output"])
|
||||
createOutputResponse["output"] = convertedItem
|
||||
return createOutputResponse;
|
||||
}
|
||||
|
||||
@@ -61,7 +55,7 @@ export class OutputsClientService implements OnModuleInit {
|
||||
console.log('OutputClientService', 'FindAll');
|
||||
|
||||
const findAllOutputResponse = await new Promise((resolve, reject) => {
|
||||
this.outputService.findAll({}).subscribe({
|
||||
this.outputService.FindAll({}).subscribe({
|
||||
next(x) {
|
||||
resolve(x);
|
||||
},
|
||||
@@ -90,7 +84,7 @@ export class OutputsClientService implements OnModuleInit {
|
||||
console.log('OutputClientService', 'FindOne');
|
||||
|
||||
const findOneOutputResponse = await new Promise((resolve, reject) => {
|
||||
this.outputService.findOne({id}).subscribe({
|
||||
this.outputService.FindOne({id}).subscribe({
|
||||
next(x) {
|
||||
resolve(x);
|
||||
},
|
||||
@@ -117,7 +111,7 @@ export class OutputsClientService implements OnModuleInit {
|
||||
console.log('OutputClientService', 'Update');
|
||||
|
||||
const updateOutputResponse = await new Promise((resolve, reject) => {
|
||||
this.outputService.update(updateOutPutDTO).subscribe({
|
||||
this.outputService.Update(updateOutPutDTO).subscribe({
|
||||
next(x) {
|
||||
resolve(x);
|
||||
},
|
||||
@@ -142,7 +136,7 @@ export class OutputsClientService implements OnModuleInit {
|
||||
console.log('OutputClientService', 'Remove');
|
||||
|
||||
const removeOutputResponse = await new Promise((resolve, reject) => {
|
||||
this.outputService.remove({id}).subscribe({
|
||||
this.outputService.Remove({id}).subscribe({
|
||||
next(x) {
|
||||
resolve(x);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user