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)) {
|
if (responseEntity.getStatusCode().equals(HttpStatus.OK)) {
|
||||||
emailUtils.sendUserRegistrationEmail(repository, authentication);
|
emailUtils.sendUserRegistrationEmail(repository, authentication);
|
||||||
}else
|
emailUtils.sendAdminRegistrationEmail(repository, authentication);
|
||||||
|
} else
|
||||||
LOGGER.debug(responseEntity.getBody().toString());
|
LOGGER.debug(responseEntity.getBody().toString());
|
||||||
|
|
||||||
return repository;
|
return repository;
|
||||||
|
@ -505,9 +506,10 @@ public class RepositoryServiceImpl implements RepositoryService {
|
||||||
HttpEntity<String> httpEntity = new HttpEntity <String> (json_repository,httpHeaders);
|
HttpEntity<String> httpEntity = new HttpEntity <String> (json_repository,httpHeaders);
|
||||||
ResponseEntity responseEntity = restTemplate.exchange(uriComponents.toUri(),HttpMethod.POST, httpEntity, ResponseEntity.class);
|
ResponseEntity responseEntity = restTemplate.exchange(uriComponents.toUri(),HttpMethod.POST, httpEntity, ResponseEntity.class);
|
||||||
|
|
||||||
if(responseEntity.getStatusCode().equals(HttpStatus.OK))
|
if(responseEntity.getStatusCode().equals(HttpStatus.OK)) {
|
||||||
emailUtils.sendUserRegistrationEmail(repository,authentication);
|
emailUtils.sendUserRegistrationEmail(repository, authentication);
|
||||||
else {
|
emailUtils.sendAdminRegistrationEmail(repository, authentication);
|
||||||
|
} else {
|
||||||
LOGGER.debug(responseEntity.getBody().toString());
|
LOGGER.debug(responseEntity.getBody().toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue