Skip to content

Commit

Permalink
refactor: apply suggestion from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
PaddseL committed Dec 17, 2024
1 parent c57ec25 commit 33f91ff
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ class ConnectorManagementApiService(
deploymentEnvironmentService.assertValidEnvId(environmentId)

val connectors = connectorService.getConnectorsByEnvironment(environmentId)
return buildConnectorOverview(connectors, withoutFrontendUrl = true)
return buildConnectorOverview(connectors, showFrontendUrl = false)
}

private fun buildConnectorOverview(
connectors: List<ConnectorRecord>,
withoutFrontendUrl: Boolean = false
showFrontendUrl: Boolean = true
): ConnectorOverviewResult {
val orgNames = organizationService.getAllOrganizationNames()

Expand All @@ -125,7 +125,7 @@ class ConnectorManagementApiService(
environment = deploymentEnvironmentDtoService.findByIdOrThrow(it.environment),
name = it.name,
status = if (it.type == ConnectorType.CAAS) it.caasStatus.toDto() else it.onlineStatus.toDto(),
frontendUrl = if (withoutFrontendUrl) null else it.frontendUrl
frontendUrl = if (showFrontendUrl) it.frontendUrl else null
)
}
return ConnectorOverviewResult(connectorDtos)
Expand Down

0 comments on commit 33f91ff

Please sign in to comment.