♻️ refactor(auth): move UserContextKey from pkg/greet to pkg/auth

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-05-06 06:54:14 +02:00
parent f74ba51d7a
commit 92e53a6801
3 changed files with 34 additions and 18 deletions

View File

@@ -4,7 +4,7 @@ import (
"context"
"net/http"
"dance-lessons-coach/pkg/greet"
"dance-lessons-coach/pkg/auth"
"dance-lessons-coach/pkg/user"
"github.com/rs/zerolog/log"
@@ -54,7 +54,7 @@ func (m *AuthMiddleware) Middleware(next http.Handler) http.Handler {
}
// Add user to context
ctxWithUser := context.WithValue(ctx, greet.UserContextKey, validatedUser)
ctxWithUser := context.WithValue(ctx, auth.UserContextKey, validatedUser)
r = r.WithContext(ctxWithUser)
// Continue to next handler