Calling the sendAdmin email notifications for the registration and update of a repository
This commit is contained in:
parent
d89b15530e
commit
04995f9b50
|
@ -422,7 +422,8 @@ public class RepositoryServiceImpl implements RepositoryService {
|
|||
|
||||
if (responseEntity.getStatusCode().equals(HttpStatus.OK)) {
|
||||
emailUtils.sendUserRegistrationEmail(repository, authentication);
|
||||
}else
|
||||
emailUtils.sendAdminRegistrationEmail(repository, authentication);
|
||||
} else
|
||||
LOGGER.debug(responseEntity.getBody().toString());
|
||||
|
||||
return repository;
|
||||
|
@ -505,9 +506,10 @@ public class RepositoryServiceImpl implements RepositoryService {
|
|||
HttpEntity<String> httpEntity = new HttpEntity <String> (json_repository,httpHeaders);
|
||||
ResponseEntity responseEntity = restTemplate.exchange(uriComponents.toUri(),HttpMethod.POST, httpEntity, ResponseEntity.class);
|
||||
|
||||
if(responseEntity.getStatusCode().equals(HttpStatus.OK))
|
||||
emailUtils.sendUserRegistrationEmail(repository,authentication);
|
||||
else {
|
||||
if(responseEntity.getStatusCode().equals(HttpStatus.OK)) {
|
||||
emailUtils.sendUserRegistrationEmail(repository, authentication);
|
||||
emailUtils.sendAdminRegistrationEmail(repository, authentication);
|
||||
} else {
|
||||
LOGGER.debug(responseEntity.getBody().toString());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue