From 4e53a6cc0f67ad12741727f442293300328b544c Mon Sep 17 00:00:00 2001 From: Salah Al Saleh Date: Sat, 21 Oct 2023 17:35:54 -0700 Subject: [PATCH] cleanup unused functions (#4101) --- pkg/session/middleware.go | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/pkg/session/middleware.go b/pkg/session/middleware.go index 22d46a06b0..91b0394f86 100644 --- a/pkg/session/middleware.go +++ b/pkg/session/middleware.go @@ -4,9 +4,7 @@ import ( "context" "net/http" - apptypes "github.com/replicatedhq/kots/pkg/app/types" "github.com/replicatedhq/kots/pkg/session/types" - "github.com/replicatedhq/kotskinds/apis/kots/v1beta1" ) type sessionKey struct{} @@ -20,21 +18,3 @@ func ContextGetSession(r *http.Request) *types.Session { sess, _ := val.(*types.Session) return sess } - -func ContextSetLicense(r *http.Request, license *v1beta1.License) *http.Request { - return r.WithContext(context.WithValue(r.Context(), "kotsLicense", license)) -} - -func ContextGetLicense(r *http.Request) *v1beta1.License { - val := r.Context().Value("kotsLicense") - return val.(*v1beta1.License) -} - -func ContextSetApp(r *http.Request, app *apptypes.App) *http.Request { - return r.WithContext(context.WithValue(r.Context(), "kotsApp", app)) -} - -func ContextGetApp(r *http.Request) *apptypes.App { - val := r.Context().Value("kotsApp") - return val.(*apptypes.App) -}