[Admin Tools | Trunk]: pom.xml: Increased version to 2.0.3 | ManagerService.java: Change response in method "getManagers()" to get them via role management instead of user management.
This commit is contained in:
parent
a9cc44c443
commit
99e01c7662
2
pom.xml
2
pom.xml
|
@ -4,7 +4,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>eu.dnetlib</groupId>
|
||||
<artifactId>uoa-admin-tools</artifactId>
|
||||
<version>2.0.2-SNAPSHOT</version>
|
||||
<version>2.0.3-SNAPSHOT</version>
|
||||
<packaging>war</packaging>
|
||||
<name>uoa-admin-tools</name>
|
||||
<!-- Use parent with artifact spring-boot-starter-parent and add plugin with artifact spring-boot-maven-plugin in order to run springboot run command-->
|
||||
|
|
|
@ -30,10 +30,10 @@ public class ManagerService {
|
|||
|
||||
public Manager[] getManagers(String pid, Type type) {
|
||||
String url = (type == Type.EMAIL)?config.getEmail():config.getId();
|
||||
ResponseEntity<Response> responseEntity = restTemplate.getForEntity(url.replace("{community}", pid), Response.class);
|
||||
Response response = responseEntity.getBody();
|
||||
if (response != null && responseEntity.getStatusCode() == HttpStatus.OK) {
|
||||
return response.getResponse();
|
||||
ResponseEntity<Manager[]> responseEntity = restTemplate.getForEntity(url.replace("{community}", pid), Manager[].class);
|
||||
Manager[] managers = responseEntity.getBody();
|
||||
if (managers != null && responseEntity.getStatusCode() == HttpStatus.OK) {
|
||||
return managers;
|
||||
} else {
|
||||
throw new ContentNotFoundException("No managers has been found for community " + pid);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue