This commit is contained in:
snoop 2017-07-04 18:09:34 +09:00
parent 87a4a2f518
commit 3badd6426b

View File

@ -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.dao.ApiKeyDAO;
import com.loafle.overflow.module.apikey.model.ApiKey; 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.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -16,9 +17,13 @@ public class ApiKeyService {
private ApiKeyDAO apiKeyDAO; 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) { public boolean check(String apiKey) {