Skip to content

Commit

Permalink
fix(server): Remove unused api call to repository on layer state get
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Marques committed Jan 26, 2024
1 parent 0d41f7c commit 6e09b0f
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions internal/server/api/layers.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,6 @@ func (a *API) LayersHandler(c echo.Context) error {
}

func (a *API) getLayerState(layer configv1alpha1.TerraformLayer) string {
repository := &configv1alpha1.TerraformRepository{}
err := a.Client.Get(context.Background(), client.ObjectKey{
Namespace: layer.Spec.Repository.Namespace,
Name: layer.Spec.Repository.Name,
}, repository)
if err != nil {
log.Errorf("could not get terraform repository: %s", err)
return "Unknown"
}
state := "success"
switch {
case len(layer.Status.Conditions) == 0:
Expand Down

0 comments on commit 6e09b0f

Please sign in to comment.