FEAT: update nimbus after input

This commit is contained in:
marcos-silva-rodrigues
2026-03-24 12:28:20 -03:00
parent 959210e354
commit 21c57e5620
10 changed files with 140 additions and 46 deletions
+14 -7
View File
@@ -17,6 +17,7 @@ import {
InputCreateGenericRequest,
InputCreateS3Request,
InputNewCreateRequest,
InputUpdateResponse,
TestConnectionRequest,
} from '@dadosfera/protospack-v2/dist/lib/Input/interfaces/messages';
import { Info } from '@dadosfera/protospack-v2/dist/lib/Input/interfaces/entities';
@@ -71,8 +72,8 @@ export class InputsService {
objectCamelToSnake(createInputResponse);
return createInputResponse;
},
update: async (updateInputDTO: UpdateInputRequest) => {
this.logger.info('InputClientService - Update');
update: async (updateInputDTO: UpdateInputRequest): Promise<InputUpdateResponse> => {
this.logger.info('InputClientService - Update' + JSON.stringify(updateInputDTO));
const updateInputResponse = await lastValueFrom(
this.inputWriteService.InputUpdate(updateInputDTO),
);
@@ -207,16 +208,22 @@ export class InputsService {
async update(id: string, data, info: Info) {
// this.validateCron({ ...data, info });
try {
const updateInputResponse: any = await this.OLD_inputClient.update({
const {
nimbusUpdates,
input
} = await this.OLD_inputClient.update({
id,
info,
...data,
info,
});
updateInputResponse.input = this.adjustInputPayload(
updateInputResponse?.input,
const updateInputResponse = this.adjustInputPayload(
input,
);
return updateInputResponse;
return {
input: updateInputResponse,
nimbusUpdates
};
} catch (err) {
throw new HttpException(err.message, HttpStatus.NOT_FOUND);
}