FIX: skip nimbus update when customer haven't catalog module

This commit is contained in:
2026-08-07 14:48:46 -03:00
parent d54f381998
commit b89909ad66
5 changed files with 38 additions and 84 deletions
+5 -4
View File
@@ -23,6 +23,7 @@ import {
} from '@dadosfera/protospack-v2/dist/lib/Input/interfaces/messages';
import { Info } from '@dadosfera/protospack-v2/dist/lib/Input/interfaces/entities';
import { CreateInputReq } from './dtos/input.model';
import { Metadata } from '@grpc/grpc-js';
@Injectable()
@@ -73,10 +74,10 @@ export class InputsService {
objectCamelToSnake(createInputResponse);
return createInputResponse;
},
update: async (updateInputDTO: UpdateInputRequest): Promise<InputUpdateResponse> => {
update: async (updateInputDTO: UpdateInputRequest, metadata: Metadata): Promise<InputUpdateResponse> => {
this.logger.info('InputClientService - Update' + JSON.stringify(updateInputDTO));
const updateInputResponse = await lastValueFrom(
this.inputWriteService.InputUpdate(updateInputDTO),
this.inputWriteService.InputUpdate(updateInputDTO, metadata),
);
return updateInputResponse;
@@ -206,7 +207,7 @@ export class InputsService {
return findOneInputResponse;
}
async update(id: string, data, info: Info) {
async update(id: string, data, info: Info, metadata?: Metadata) {
// this.validateCron({ ...data, info });
try {
const {
@@ -217,7 +218,7 @@ export class InputsService {
id,
...data,
info,
});
}, metadata);
const updateInputResponse = this.adjustInputPayload(
input,