fixed Homebox typo
This commit is contained in:
+6
-2
@@ -11,18 +11,21 @@ import org.springframework.web.client.RestClient;
|
||||
|
||||
import com.vaessl.app.dto.ConnectionRequest;
|
||||
import com.vaessl.app.dto.ConnectionResponse;
|
||||
import com.vaessl.app.exception.ConnectionNotFoundException;
|
||||
import com.vaessl.app.exception.EmptyCredentialsException;
|
||||
import com.vaessl.app.search.SearchRequest;
|
||||
import com.vaessl.app.search.SearchResponse;
|
||||
|
||||
import static com.vaessl.app.connection.Endpoint.*;
|
||||
|
||||
@Component
|
||||
public class HomeBoxConnectionProvider implements ConnectionProvider {
|
||||
public class HomeboxConnectionProvider implements ConnectionProvider {
|
||||
|
||||
private final RestClient.Builder restClientBuilder;
|
||||
|
||||
private final ConnectionRepository cRepository;
|
||||
|
||||
public HomeBoxConnectionProvider(RestClient.Builder restClientBuilder, ConnectionRepository cRepository) {
|
||||
public HomeboxConnectionProvider(RestClient.Builder restClientBuilder, ConnectionRepository cRepository) {
|
||||
this.restClientBuilder = restClientBuilder;
|
||||
this.cRepository = cRepository;
|
||||
}
|
||||
@@ -105,4 +108,5 @@ public class HomeBoxConnectionProvider implements ConnectionProvider {
|
||||
private record HomeboxLoginResponse(String token, String attachmentToken, Instant expiresAt) {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+2
-2
@@ -10,9 +10,9 @@ import com.vaessl.app.exception.EmptyCredentialsException;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static com.vaessl.app.connection.Mockdata.*;
|
||||
|
||||
class HomeBoxConnectionProviderTest {
|
||||
class HomeboxConnectionProviderTest {
|
||||
|
||||
private final HomeBoxConnectionProvider provider = new HomeBoxConnectionProvider(null, null);
|
||||
private final HomeboxConnectionProvider provider = new HomeboxConnectionProvider(null, null);
|
||||
|
||||
@Test
|
||||
void checkCredentials_ShouldThrowException_WhenFieldsAreMissing() {
|
||||
@@ -94,7 +94,7 @@ The entire commit can be reviewed under following hash 43bbcece7a901e94021e10bca
|
||||
- DELETE /connections/{serviceType} — removes the specific key from the session. If no connections remain, the session is invalidated entirely.
|
||||
|
||||
---
|
||||
**connection/HomeBoxConnectionProvider.java (modified)**
|
||||
**connection/HomeboxConnectionProvider.java (modified)**
|
||||
|
||||
Implements the new interface methods:
|
||||
- checkCredentials validates that username and password are present before touching the network.
|
||||
|
||||
@@ -94,11 +94,11 @@ public interface ConnectionProvider {
|
||||
- `findUniqueConnectionEntry` — looks up an existing record to decide insert vs. update
|
||||
- `getTokenExpiry` — default returns `null` (no expiry); token-based providers override this so `ConnectionService` can compute the `connected` flag
|
||||
|
||||
***HomeBoxConnectionProvider.java***
|
||||
***HomeboxConnectionProvider.java***
|
||||
|
||||
```java
|
||||
@Component
|
||||
public class HomeBoxConnectionProvider implements ConnectionProvider {
|
||||
public class HomeboxConnectionProvider implements ConnectionProvider {
|
||||
|
||||
@Override
|
||||
public String getServiceType() { return "HOMEBOX"; }
|
||||
|
||||
Reference in New Issue
Block a user