added sonarqube config #41
@@ -52,7 +52,8 @@ public class ConnectionService {
|
||||
return new LoginResult(saved.getId(), response.expiresAt());
|
||||
}
|
||||
|
||||
public ConnectionStatusResponse getConnectionStatus(ServiceType serviceType, Long connectionId) {
|
||||
public ConnectionStatusResponse getConnectionStatus(ServiceType serviceType,
|
||||
Long connectionId) {
|
||||
ConnectionEntity entity = cRepository.findById(connectionId).orElse(null);
|
||||
if (entity == null)
|
||||
return null;
|
||||
@@ -61,7 +62,7 @@ public class ConnectionService {
|
||||
Instant expiresAt = (provider != null) ? provider.getTokenExpiry(entity) : null;
|
||||
boolean connected = expiresAt == null || expiresAt.isAfter(Instant.now());
|
||||
|
||||
return new ConnectionStatusResponse(serviceType.name(), entity.getAppUrl(), entity.getUsername(),
|
||||
expiresAt, connected);
|
||||
return new ConnectionStatusResponse(serviceType.name(), entity.getAppUrl(),
|
||||
entity.getUsername(), expiresAt, connected);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user