fix: ctx's not property nested

This commit is contained in:
Derrick Hammer 2024-03-18 17:29:49 -04:00
parent d1c5bde5c1
commit 2067c68a72
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 1 deletions

View File

@ -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)