From 2067c68a7248a08cc378b5c13477d1407242f84d Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Mon, 18 Mar 2024 17:29:49 -0400 Subject: [PATCH] fix: ctx's not property nested --- api/middleware/middleware.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/middleware/middleware.go b/api/middleware/middleware.go index b130c17..df87d90 100644 --- a/api/middleware/middleware.go +++ b/api/middleware/middleware.go @@ -155,7 +155,7 @@ func AuthMiddleware(options AuthMiddlewareOptions) func(http.Handler) http.Handl } ctx := context.WithValue(r.Context(), options.AuthContextKey, uint(userId)) - ctx = context.WithValue(r.Context(), AUTH_TOKEN_CONTEXT_KEY, authToken) + ctx = context.WithValue(ctx, AUTH_TOKEN_CONTEXT_KEY, authToken) r = r.WithContext(ctx) next.ServeHTTP(w, r)