diff --git a/src/main/java/com/loafle/overflow/module/noauthprobe/service/NoAuthProbeService.java b/src/main/java/com/loafle/overflow/module/noauthprobe/service/NoAuthProbeService.java index 9bd218e..057735f 100644 --- a/src/main/java/com/loafle/overflow/module/noauthprobe/service/NoAuthProbeService.java +++ b/src/main/java/com/loafle/overflow/module/noauthprobe/service/NoAuthProbeService.java @@ -1,5 +1,7 @@ package com.loafle.overflow.module.noauthprobe.service; +import com.loafle.overflow.module.apikey.model.ApiKey; +import com.loafle.overflow.module.apikey.service.ApiKeyService; import com.loafle.overflow.module.domain.model.Domain; import com.loafle.overflow.module.member.model.Member; import com.loafle.overflow.module.meta.model.MetaNoAuthProbeStatus; @@ -26,6 +28,9 @@ public class NoAuthProbeService { @Autowired private NoAuthProbeDAO noAuthProbeDAO; + @Autowired + private ApiKeyService apiKeyService; + @Autowired private ProbeService probeService; @@ -37,6 +42,9 @@ public class NoAuthProbeService { noAuthProbe.setTempProbeKey(UUID.randomUUID().toString()); noAuthProbe.setStatus(new MetaNoAuthProbeStatus((short)3)); + ApiKey apiKey = apiKeyService.readByApiKey(noAuthProbe.getApiKey()); + noAuthProbe.setDomain(apiKey.getDomain()); + return this.noAuthProbeDAO.save(noAuthProbe); }