From f6bb9934580990acaf701275e6cee426e5c8ee89 Mon Sep 17 00:00:00 2001 From: insanity Date: Thu, 14 Jun 2018 19:30:39 +0900 Subject: [PATCH] noauth fix --- pom.xml | 2 +- .../service/CentralNoAuthProbeService.java | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index a483ad1..2f10b28 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ com.loafle.overflow commons-java - 1.0.64-SNAPSHOT + 1.0.66-SNAPSHOT diff --git a/src/main/java/com/loafle/overflow/central/module/noauthprobe/service/CentralNoAuthProbeService.java b/src/main/java/com/loafle/overflow/central/module/noauthprobe/service/CentralNoAuthProbeService.java index ee54807..1026c03 100644 --- a/src/main/java/com/loafle/overflow/central/module/noauthprobe/service/CentralNoAuthProbeService.java +++ b/src/main/java/com/loafle/overflow/central/module/noauthprobe/service/CentralNoAuthProbeService.java @@ -102,7 +102,7 @@ public class CentralNoAuthProbeService implements NoAuthProbeService { @WebappAPI @Transactional - public List acceptNoAuthProbe(Long noAuthProbeID, String zoneCIDR) throws OverflowException { + public NoAuthProbe acceptNoAuthProbe(Long noAuthProbeID, String zoneCIDR) throws OverflowException { NoAuthProbe noAuthProbe = this.noAuthProbeDAO.findById(noAuthProbeID).get(); if (null == noAuthProbe) { throw new OverflowException(String.format("ID(%s) of NoAuthProbe is not exist", noAuthProbeID)); @@ -185,24 +185,24 @@ public class CentralNoAuthProbeService implements NoAuthProbeService { this.probeHostService.regist(probeHost); noAuthProbe.setMetaNoAuthProbeStatus(MetaNoAuthProbeStatus.Enum.ACCEPTED.to()); - this.noAuthProbeDAO.save(noAuthProbe); + NoAuthProbe resultNoauthProbe = this.noAuthProbeDAO.save(noAuthProbe); messagePublisher.publishToNoAuthProbe(noAuthProbe.getTempProbeKey(), "NoAuthProbeService.Accept", probe.getProbeKey()); - return this.readAllByDomainID(noAuthProbe.getDomain().getId()); + return resultNoauthProbe; } @WebappAPI - public List denyNoauthProbe(Long noAuthProbeID) throws OverflowException { + public NoAuthProbe denyNoauthProbe(Long noAuthProbeID) throws OverflowException { NoAuthProbe noAuthProbe = this.noAuthProbeDAO.findById(noAuthProbeID).get(); noAuthProbe.setMetaNoAuthProbeStatus(MetaNoAuthProbeStatus.Enum.DENIED.to()); - this.noAuthProbeDAO.save(noAuthProbe); + NoAuthProbe resultNoauthProbe = this.noAuthProbeDAO.save(noAuthProbe); messagePublisher.publishToNoAuthProbe(noAuthProbe.getTempProbeKey(), "NoAuthProbeService.Deny"); - return this.readAllByDomainID(noAuthProbe.getDomain().getId()); + return resultNoauthProbe; } public NoAuthProbe readByTempProbeKey(String tempKey) throws OverflowException {