Skip to content

Commit

Permalink
fix: use ctx
Browse files Browse the repository at this point in the history
  • Loading branch information
jose-fully-ported committed Sep 19, 2023
1 parent f253691 commit 7041cd6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/server/handlers/porter_app/create_secret_and_open_pr.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 7041cd6

Please sign in to comment.