From 7041cd6669586b2a32dbba8e3020c2d55682c992 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 19 Sep 2023 12:08:22 -0400 Subject: [PATCH] fix: use ctx --- api/server/handlers/porter_app/create_secret_and_open_pr.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/server/handlers/porter_app/create_secret_and_open_pr.go b/api/server/handlers/porter_app/create_secret_and_open_pr.go index 777a649a42..8954be8e7b 100644 --- a/api/server/handlers/porter_app/create_secret_and_open_pr.go +++ b/api/server/handlers/porter_app/create_secret_and_open_pr.go @@ -38,9 +38,9 @@ func (c *OpenStackPRHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { ctx, span := telemetry.NewSpan(r.Context(), "serve-open-stack-pr") defer span.End() - user, _ := r.Context().Value(types.UserScope).(*models.User) - project, _ := r.Context().Value(types.ProjectScope).(*models.Project) - cluster, _ := r.Context().Value(types.ClusterScope).(*models.Cluster) + user, _ := ctx.Value(types.UserScope).(*models.User) + project, _ := ctx.Value(types.ProjectScope).(*models.Project) + cluster, _ := ctx.Value(types.ClusterScope).(*models.Cluster) appName, reqErr := requestutils.GetURLParamString(r, types.URLParamPorterAppName) if reqErr != nil { c.HandleAPIError(w, r, apierrors.NewErrPassThroughToClient(reqErr, http.StatusBadRequest))