Skip to content

Commit

Permalink
[MOSIP-31284] (#936)
Browse files Browse the repository at this point in the history
Signed-off-by: Balaji <[email protected]>
  • Loading branch information
balaji-alluru authored Feb 13, 2024
1 parent 9b989cc commit b7fafcf
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 b7fafcf

Please sign in to comment.