Skip to content

Commit

Permalink
refactor: remove context from vlient BaseRequest
Browse files Browse the repository at this point in the history
the context is passed into each method
  • Loading branch information
frrist committed Jan 26, 2024
1 parent e59b278 commit 032eec4
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions pkg/publicapi/apimodels/base_requests.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package apimodels

import (
"context"
"strconv"
)

// BaseRequest is the base request used for all requests
type BaseRequest struct {
Namespace string `query:"namespace"`
Headers map[string]string `query:"-"`
Context context.Context `query:"-"`

// A good place to define other fields that are common to all requests,
// such as auth tokens
Expand All @@ -22,9 +20,6 @@ func (o *BaseRequest) ToHTTPRequest() *HTTPRequest {
if o.Namespace != "" {
r.Params.Set("namespace", o.Namespace)
}
if o.Context != nil {
r.Ctx = o.Context
}

for k, v := range o.Headers {
r.Header.Set(k, v)
Expand Down

0 comments on commit 032eec4

Please sign in to comment.