Skip to content

Commit 8e4ab9d

Browse files
committed
chore: remove duplicated func in the pkg
Signed-off-by: emreya <e.yazici1990@gmail.com>
1 parent fe0f4e0 commit 8e4ab9d

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

controllers/client/grafana_client.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -207,16 +207,3 @@ func getAdminCredentials(ctx context.Context, c client.Client, grafana *v1beta1.
207207
}
208208
return cred, nil
209209
}
210-
211-
func InjectAuthHeaders(ctx context.Context, c client.Client, grafana *v1beta1.Grafana, req *http.Request) error {
212-
cred, err := getAdminCredentials(ctx, c, grafana)
213-
if err != nil {
214-
return fmt.Errorf("fetching admin credentials: %w", err)
215-
}
216-
if cred.apikey != "" {
217-
req.Header.Add("Authorization", "Bearer "+cred.apikey)
218-
} else {
219-
req.SetBasicAuth(cred.username, cred.password)
220-
}
221-
return nil
222-
}

0 commit comments

Comments
 (0)