Skip to content

Commit

Permalink
Revert "Fix for setting read status to false (mosip#791)"
Browse files Browse the repository at this point in the history
This reverts commit c00a051.
  • Loading branch information
Loganathan Sekar committed Mar 13, 2023
1 parent 42e4b47 commit e282f74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ public CredentialRequestStatusResponseDto getStatus(String requestId) {
return credentialRequestStatusResponseDto;
}

private CredentialReqestDto prepareCredentialRequest(ResidentCredentialRequestDto residentCreDto, String individualId) {
public CredentialReqestDto prepareCredentialRequest(ResidentCredentialRequestDto residentCreDto, String individualId) {
CredentialReqestDto crDto = new CredentialReqestDto();
if(Utility.isSecureSession()){
crDto.setId(individualId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@ public void updateAuthTypeStatus(EventModel eventModel) throws ResidentServiceCh
auditUtil.setAuditRequestDto(EventEnum.UPDATE_AUTH_TYPE_STATUS);
try{
logger.info( "WebSubUpdateAuthTypeServiceImpl::updateAuthTypeStatus()::partnerId");
String eventId = updateInResidentTransactionTable(eventModel,"COMPLETED");
String eventId = insertInResidentTransactionTable(eventModel,"COMPLETED");
sendNotificationV2(TemplateType.SUCCESS,eventId);
}
catch (Exception e) {
logger.error(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.APPLICATIONID.toString(),
LoggerFileConstant.APPLICATIONID.toString(), "WebSubUpdateAuthTypeServiceImpl::updateAuthTypeStatus()::exception");
String eventId = updateInResidentTransactionTable(eventModel,"FAILED");
String eventId = insertInResidentTransactionTable(eventModel,"FAILED");
sendNotificationV2(TemplateType.FAILURE, eventId);
throw new ResidentServiceCheckedException(ResidentErrorCode.RESIDENT_WEBSUB_UPDATE_AUTH_TYPE_FAILED.getErrorCode(),
ResidentErrorCode.RESIDENT_WEBSUB_UPDATE_AUTH_TYPE_FAILED.getErrorMessage(), e);
}
}

private String updateInResidentTransactionTable(EventModel eventModel, String status) {
private String insertInResidentTransactionTable(EventModel eventModel, String status) {

logger.debug(LoggerFileConstant.SESSIONID.toString(), LoggerFileConstant.APPLICATIONID.toString(),
LoggerFileConstant.APPLICATIONID.toString(), "WebSubUpdateAuthTypeServiceImpl::insertInResidentTransactionTable()::entry");
Expand All @@ -76,7 +76,6 @@ private String updateInResidentTransactionTable(EventModel eventModel, String s
if(residentTransactionEntity!=null){
residentTransactionEntity.stream().forEach(residentTransactionEntity1 -> {
residentTransactionEntity1.setStatusCode(status);
residentTransactionEntity1.setReadStatus(false);
});
residentTransactionRepository.saveAll(residentTransactionEntity);
}
Expand Down

0 comments on commit e282f74

Please sign in to comment.