From 2ccf024e1bc3709431ea58d8baa396139d8291cf Mon Sep 17 00:00:00 2001 From: Vincenzo Ingenito Date: Fri, 5 Apr 2024 17:00:14 +0200 Subject: [PATCH] fix: ISSUE 723 e 725 --- .../ms/gtw/dispatcher/controller/impl/PublicationCTL.java | 2 +- .../sanita/fse2/ms/gtw/dispatcher/service/impl/JwtSRV.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/it/finanze/sanita/fse2/ms/gtw/dispatcher/controller/impl/PublicationCTL.java b/src/main/java/it/finanze/sanita/fse2/ms/gtw/dispatcher/controller/impl/PublicationCTL.java index 0218f5f..a674a15 100644 --- a/src/main/java/it/finanze/sanita/fse2/ms/gtw/dispatcher/controller/impl/PublicationCTL.java +++ b/src/main/java/it/finanze/sanita/fse2/ms/gtw/dispatcher/controller/impl/PublicationCTL.java @@ -680,7 +680,7 @@ public ResponseEntity validateAndReplace( ValidationCreationInputDTO validationResult = new ValidationCreationInputDTO(); try { //Valido request e jwt come se fosse una pubblicazione - validationResult = publicationAndReplaceValidation(file, request, false,idDoc,traceInfoDTO,EventTypeEnum.VALIDATION_FOR_REPLACE); + validationResult = publicationAndReplaceValidation(file, request, true,idDoc,traceInfoDTO,EventTypeEnum.VALIDATION_FOR_REPLACE); docT = Jsoup.parse(validationResult.getCda()); workflowInstanceId = CdaUtility.getWorkflowInstanceId(docT); diff --git a/src/main/java/it/finanze/sanita/fse2/ms/gtw/dispatcher/service/impl/JwtSRV.java b/src/main/java/it/finanze/sanita/fse2/ms/gtw/dispatcher/service/impl/JwtSRV.java index 3c7d743..a9bff1f 100644 --- a/src/main/java/it/finanze/sanita/fse2/ms/gtw/dispatcher/service/impl/JwtSRV.java +++ b/src/main/java/it/finanze/sanita/fse2/ms/gtw/dispatcher/service/impl/JwtSRV.java @@ -74,8 +74,8 @@ public void validatePayloadForCreate(JWTPayloadDTO payload) { public void validatePayloadForReplace(JWTPayloadDTO payload) { performCommonValidation(payload); checkNull(payload.getResource_hl7_type(), "resource_hl7_type"); - validateActionCoherence(payload, ActionEnum.CREATE); - validatePurposeOfUseCoherence(payload, PurposeOfUseEnum.TREATMENT); + validateActionCoherence(payload, ActionEnum.UPDATE); + validatePurposeOfUseCoherence(payload, PurposeOfUseEnum.UPDATE); } @Override