From 9245c3ffe41aa607d13091e303d6e061f7af8498 Mon Sep 17 00:00:00 2001 From: Dana Fallon <8871189+danafallon@users.noreply.github.com> Date: Thu, 25 Jul 2024 15:03:11 -0700 Subject: [PATCH] Make it private --- internal/provider/deployment_resource.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/provider/deployment_resource.go b/internal/provider/deployment_resource.go index 457cbba..9b426f0 100644 --- a/internal/provider/deployment_resource.go +++ b/internal/provider/deployment_resource.go @@ -192,7 +192,7 @@ func (r *DeploymentResource) Read(ctx context.Context, req resource.ReadRequest, return } - bodyBytes, err := r.HandleAPIRequest(ctx, apiReq) + bodyBytes, err := r.handleAPIRequest(ctx, apiReq) if err != nil { resp.Diagnostics.AddError("Unable to Read Deployment", err.Error()) return @@ -242,7 +242,7 @@ func (r *DeploymentResource) Update(ctx context.Context, req resource.UpdateRequ return } - bodyBytes, err := r.HandleAPIRequest(ctx, apiReq) + bodyBytes, err := r.handleAPIRequest(ctx, apiReq) if err != nil { resp.Diagnostics.AddError("Unable to Update Deployment", err.Error()) return @@ -278,7 +278,7 @@ func (r *DeploymentResource) ImportState(ctx context.Context, req resource.Impor resource.ImportStatePassthroughID(ctx, path.Root("uuid"), req, resp) } -func (r *DeploymentResource) HandleAPIRequest(ctx context.Context, apiReq *http.Request) (bodyBytes []byte, err error) { +func (r *DeploymentResource) handleAPIRequest(ctx context.Context, apiReq *http.Request) (bodyBytes []byte, err error) { apiReq.Header.Set("Authorization", fmt.Sprintf("Bearer %s", r.apiKey)) apiResp, err := http.DefaultClient.Do(apiReq) if err != nil {