From a45080cabae54bea76787a7c01cc4daaa99f526b Mon Sep 17 00:00:00 2001 From: Edward Viaene Date: Tue, 15 Oct 2024 12:33:32 -0500 Subject: [PATCH] inject license count --- rest/middleware.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rest/middleware.go b/rest/middleware.go index 7d43397..6efed10 100644 --- a/rest/middleware.go +++ b/rest/middleware.go @@ -14,7 +14,6 @@ import ( ) type CustomValue string -type CustomIntValue string // auth middleware @@ -142,7 +141,7 @@ func (c *Context) injectUserMiddleware(next http.Handler) http.Handler { } ctx := context.WithValue(r.Context(), CustomValue("user"), user) - ctx = context.WithValue(ctx, CustomIntValue("licenseUserCount"), c.LicenseUserCount) + ctx = context.WithValue(ctx, CustomValue("licenseUserCount"), c.LicenseUserCount) next.ServeHTTP(w, r.WithContext(ctx)) }) }