Revision 55586
Added by Stefania Martziou about 5 years ago
modules/uoa-repository-manager-service/branches/dev-api/src/main/java/eu/dnetlib/repo/manager/service/RepositoryServiceImpl.java | ||
---|---|---|
422 | 422 |
|
423 | 423 |
if (responseEntity.getStatusCode().equals(HttpStatus.OK)) { |
424 | 424 |
emailUtils.sendUserRegistrationEmail(repository, authentication); |
425 |
}else |
|
425 |
emailUtils.sendAdminRegistrationEmail(repository, authentication); |
|
426 |
} else |
|
426 | 427 |
LOGGER.debug(responseEntity.getBody().toString()); |
427 | 428 |
|
428 | 429 |
return repository; |
... | ... | |
505 | 506 |
HttpEntity<String> httpEntity = new HttpEntity <String> (json_repository,httpHeaders); |
506 | 507 |
ResponseEntity responseEntity = restTemplate.exchange(uriComponents.toUri(),HttpMethod.POST, httpEntity, ResponseEntity.class); |
507 | 508 |
|
508 |
if(responseEntity.getStatusCode().equals(HttpStatus.OK)) |
|
509 |
emailUtils.sendUserRegistrationEmail(repository,authentication); |
|
510 |
else { |
|
509 |
if(responseEntity.getStatusCode().equals(HttpStatus.OK)) { |
|
510 |
emailUtils.sendUserRegistrationEmail(repository, authentication); |
|
511 |
emailUtils.sendAdminRegistrationEmail(repository, authentication); |
|
512 |
} else { |
|
511 | 513 |
LOGGER.debug(responseEntity.getBody().toString()); |
512 | 514 |
} |
513 | 515 |
} |
Also available in: Unified diff
Calling the sendAdmin email notifications for the registration and update of a repository