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
…228)

Co-authored-by: Lucas Marques <lucas.marques@ext.bpifrance.fr>
  • Loading branch information
LucasMrqes and Lucas Marques authored Jan 26, 2024
1 parent 0d41f7c commit faa2152
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 faa2152

Please sign in to comment.