Skip to content

Commit

Permalink
[MOSIP-31284] (mosip#936)
Browse files Browse the repository at this point in the history
Signed-off-by: Balaji <[email protected]>
Signed-off-by: dhanendra06 <[email protected]>
  • Loading branch information
balaji-alluru authored and dhanendra06 committed Jun 12, 2024
1 parent 5e6e913 commit 875371c
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,16 @@ public AuditManagerResponseDto logAdminAudit(AuditManagerRequestDto auditManager
auditManagerRequestDto.setSessionUserName(username);
auditManagerRequestDto.setCreatedBy(getHeaderValue(HttpHeaders.REFERER));

HttpHeaders auditReqHeaders = new HttpHeaders();
auditReqHeaders.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));
RequestWrapper<AuditManagerRequestDto> request = new RequestWrapper<>();
request.setId("mosip.admin.audit");
request.setVersion("0.1");
request.setRequesttime(LocalDateTime.now());
request.setRequest(auditManagerRequestDto);

HttpEntity<RequestWrapper<AuditManagerRequestDto>> entity = new HttpEntity<>(request, auditReqHeaders);
HttpEntity<RequestWrapper<AuditManagerRequestDto>> entity = new HttpEntity<>(request);

try {
restTemplate.postForEntity(auditmanagerapi, entity, Object.class);
restTemplate.postForEntity(auditmanagerapi, entity, String.class);
} catch (HttpClientErrorException | HttpServerErrorException ex) {
throw new MasterDataServiceException(AdminManagerProxyErrorCode.ADMIN_LOG_FAILED.getErrorCode(),
AdminManagerProxyErrorCode.ADMIN_LOG_FAILED.getErrorMessage(), ex);
Expand Down

0 comments on commit 875371c

Please sign in to comment.