Skip to content

Commit

Permalink
Api fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitolo-Andrea committed Dec 13, 2024
1 parent 1682874 commit 31dbfa8
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ public Mono<CitizenConsentDTO> createCitizenConsent(String fiscalCode, String tp
.tppState(true)
.tcDate(LocalDateTime.now())
.build());
citizenRepository.save(citizenConsent)
.doOnSuccess(savedConsent -> bloomFilterService.add(fiscalCode));
citizenRepository.save(citizenConsent);
}
Map<String, ConsentDetails> consents = new HashMap<>();
consents.put(tppId, citizenConsent.getConsents().get(tppId));
Expand All @@ -78,9 +77,9 @@ public Mono<CitizenConsentDTO> createCitizenConsent(String fiscalCode, String tp
.build();
return citizenRepository
.save(citizenConsentToSave)
.map(mapperToDTO::map)
.doOnSuccess(savedConsent -> bloomFilterService.add(fiscalCode));
.map(mapperToDTO::map);
}))
.doOnSuccess(savedConsent -> bloomFilterService.add(fiscalCode))
)
.doOnSuccess(savedConsent -> log.info("[EMD][CREATE-CITIZEN-CONSENT] Created new citizen consent for fiscal code: {}", Utils.createSHA256(fiscalCode)));
}
Expand Down

0 comments on commit 31dbfa8

Please sign in to comment.