mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-21 16:29:08 +00:00
FIX: new route for synchronizing connections with platform
This commit is contained in:
@@ -3,7 +3,10 @@ import { ClientGrpc } from '@nestjs/microservices';
|
||||
import { DadosferaLogger } from '@dadosfera/dadosfera-logs';
|
||||
|
||||
import { ProtoServices } from '@dadosfera/protospack-v2/dist/lib/Duc';
|
||||
import { UsersProtoService } from '@dadosfera/protospack-v2/dist/lib/Duc/interfaces/write-service';
|
||||
import {
|
||||
CustomersProtoService,
|
||||
UsersProtoService,
|
||||
} from '@dadosfera/protospack-v2/dist/lib/Duc/interfaces/write-service';
|
||||
import {
|
||||
AssignRoleToUserRequest,
|
||||
IdRequest,
|
||||
@@ -31,6 +34,7 @@ export class UsersService implements OnModuleInit {
|
||||
language: LanguageEnum = LanguageEnum.ptbr;
|
||||
|
||||
private usersClientService: UsersProtoService;
|
||||
private customersClientService: CustomersProtoService;
|
||||
constructor(
|
||||
@Inject(DadosferaLogger)
|
||||
dadosferaLogger: DadosferaLogger,
|
||||
@@ -41,9 +45,12 @@ export class UsersService implements OnModuleInit {
|
||||
}
|
||||
|
||||
onModuleInit() {
|
||||
this.usersClientService = this.grpcClient.getService<UsersProtoService>(
|
||||
this.usersClientService = this.grpcClient.getService(
|
||||
ProtoServices.UsersProtoService,
|
||||
);
|
||||
this.customersClientService = this.grpcClient.getService(
|
||||
ProtoServices.CustomersProtoService,
|
||||
);
|
||||
}
|
||||
|
||||
setLanguage(l: LanguageEnum = LanguageEnum.ptbr) {
|
||||
@@ -200,4 +207,8 @@ export class UsersService implements OnModuleInit {
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
async findaAllCustomers() {
|
||||
return await lastValueFrom(this.customersClientService.CustomerFindAll({}));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user