diff --git a/src/main/java/com/loafle/overflow/module/apikey/service/ApiKeyService.java b/src/main/java/com/loafle/overflow/module/apikey/service/ApiKeyService.java index ba3148a..b9e8919 100644 --- a/src/main/java/com/loafle/overflow/module/apikey/service/ApiKeyService.java +++ b/src/main/java/com/loafle/overflow/module/apikey/service/ApiKeyService.java @@ -2,6 +2,7 @@ package com.loafle.overflow.module.apikey.service; import com.loafle.overflow.module.apikey.dao.ApiKeyDAO; import com.loafle.overflow.module.apikey.model.ApiKey; +import com.loafle.overflow.module.domain.model.Domain; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -16,9 +17,13 @@ public class ApiKeyService { private ApiKeyDAO apiKeyDAO; - public void regist(ApiKey apiKey) { + public ApiKey regist(ApiKey apiKey) { - this.apiKeyDAO.save(apiKey); + return this.apiKeyDAO.save(apiKey); + } + + public ApiKey readByDomain(Domain domain) { + return this.apiKeyDAO.findByDomain(domain); } public boolean check(String apiKey) {