From 3badd6426b71cf17a1f9885397868b517f04b383 Mon Sep 17 00:00:00 2001 From: snoop Date: Tue, 4 Jul 2017 18:09:34 +0900 Subject: [PATCH] added --- .../overflow/module/apikey/service/ApiKeyService.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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) {