[Monitor Service | master]: MonitorController.java: In method "updatePortal()" call also pageService.updatePid if pid was changed | pom.xml: Updated version of uoa-admin-tools-library to 1.0.7 (previous was 1.0.6).
This commit is contained in:
parent
29cc52a65f
commit
806e1e16d8
2
pom.xml
2
pom.xml
|
@ -30,7 +30,7 @@
|
|||
<dependency> <!-- this dependency includes dependency to uoa-authorization-library -->
|
||||
<groupId>eu.dnetlib</groupId>
|
||||
<artifactId>uoa-admin-tools-library</artifactId>
|
||||
<version>1.0.6</version>
|
||||
<version>1.0.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>eu.dnetlib</groupId>
|
||||
|
|
|
@ -2,6 +2,7 @@ package eu.dnetlib.uoamonitorservice.controllers;
|
|||
|
||||
import eu.dnetlib.uoaadmintoolslibrary.entities.Portal;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.entities.fullEntities.*;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.services.PageService;
|
||||
import eu.dnetlib.uoaadmintoolslibrary.services.PortalService;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
@ -22,10 +23,19 @@ public class MonitorController {
|
|||
@Autowired
|
||||
private PortalService portalService;
|
||||
|
||||
@Autowired
|
||||
private PageService pageService;
|
||||
|
||||
@RequestMapping(value = "/update", method = RequestMethod.POST)
|
||||
public PortalResponse updatePortal(@RequestBody Portal portal) {
|
||||
String old_pid = portalService.getPortalById(portal.getId()).getPid();
|
||||
String new_pid = portal.getPid();
|
||||
|
||||
PortalResponse portalResponse = portalService.updatePortal(portal);
|
||||
|
||||
if (!old_pid.equals(new_pid)) {
|
||||
pageService.updatePid(old_pid, new_pid, portal.getType());
|
||||
}
|
||||
// String old_pid = portalResponse.getPid();
|
||||
// String new_pid = portal.getPid();
|
||||
// if(!old_pid.equals(new_pid)) {
|
||||
|
|
Loading…
Reference in New Issue