replaced constructor with RequiredArgsConstructor annotation
This commit is contained in:
@@ -12,22 +12,17 @@ import org.springframework.web.client.RestClient;
|
||||
import com.vaessl.app.exception.EmptyCredentialsException;
|
||||
import com.vaessl.app.exception.RemoteApiException;
|
||||
import com.vaessl.app.shared.ServiceType;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import static com.vaessl.app.shared.Endpoint.*;
|
||||
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class HomeboxConnectionProvider implements ConnectionProvider {
|
||||
|
||||
private final RestClient.Builder restClientBuilder;
|
||||
|
||||
private final ConnectionRepository cRepository;
|
||||
|
||||
public HomeboxConnectionProvider(RestClient.Builder restClientBuilder,
|
||||
ConnectionRepository cRepository) {
|
||||
this.restClientBuilder = restClientBuilder;
|
||||
this.cRepository = cRepository;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkCredentials(ConnectionRequest request) {
|
||||
if (request.username() == null || request.password() == null) {
|
||||
|
||||
Reference in New Issue
Block a user