added apikey readByApikey
This commit is contained in:
parent
03e8d2711c
commit
cf70bc7bcb
|
@ -37,4 +37,8 @@ public class ApiKeyService {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ApiKey readByApiKey(String apiKey) {
|
||||||
|
return this.apiKeyDAO.findByApiKey(apiKey);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.loafle.overflow.module.apikey.service;
|
package com.loafle.overflow.module.apikey.service;
|
||||||
|
|
||||||
|
import com.google.protobuf.Api;
|
||||||
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 com.loafle.overflow.module.domain.model.Domain;
|
||||||
import com.loafle.overflow.spring.AppConfigTest;
|
import com.loafle.overflow.spring.AppConfigTest;
|
||||||
|
@ -68,4 +69,13 @@ public class ApiKeyServiceTest {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void readByApiKey() {
|
||||||
|
|
||||||
|
ApiKey apiKey = this.apiKeyService.readByApiKey("52abd6fd57e511e7ac52080027658d13");
|
||||||
|
|
||||||
|
Assert.assertNotEquals(apiKey, null);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user