fix: ctx's not property nested
This commit is contained in:
parent
d1c5bde5c1
commit
2067c68a72
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue