Calling the sendAdmin email notifications for the registration and update of a repository - correct

This commit is contained in:
Stefania Martziou 2019-05-17 07:28:08 +00:00
parent 04995f9b50
commit 4d79978392
1 changed files with 3 additions and 2 deletions

View File

@ -452,9 +452,10 @@ public class RepositoryServiceImpl implements RepositoryService {
ResponseEntity responseEntity = restTemplate.exchange(uriComponents.toUri(),HttpMethod.POST, httpEntity
, ResponseEntity.class);
if (responseEntity.getStatusCode().equals(HttpStatus.OK))
if (responseEntity.getStatusCode().equals(HttpStatus.OK)) {
emailUtils.sendUserUpdateRepositoryEmail(repository, authentication);
else
emailUtils.sendAdminUpdateRepositoryEmail(repository, authentication);
} else
LOGGER.debug(responseEntity.getBody().toString());
return repository;