noauth fix

This commit is contained in:
insanity 2018-06-14 19:30:39 +09:00
parent 17ead21fc9
commit f6bb993458
2 changed files with 7 additions and 7 deletions

View File

@ -51,7 +51,7 @@
<dependency>
<groupId>com.loafle.overflow</groupId>
<artifactId>commons-java</artifactId>
<version>1.0.64-SNAPSHOT</version>
<version>1.0.66-SNAPSHOT</version>
</dependency>
<dependency>

View File

@ -102,7 +102,7 @@ public class CentralNoAuthProbeService implements NoAuthProbeService {
@WebappAPI
@Transactional
public List<NoAuthProbe> 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<NoAuthProbe> 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 {