Fix: pass username in ctx; more test words

This commit is contained in:
Grail Finder
2025-05-07 06:56:17 +03:00
parent 7bd8e8af06
commit 86ef35160c
4 changed files with 45 additions and 25 deletions

View File

@ -94,7 +94,7 @@ func GetSession(next http.Handler) http.Handler {
}
ctx := context.WithValue(r.Context(),
models.CtxUsernameKey, userSession.Username)
ctx = context.WithValue(r.Context(),
ctx = context.WithValue(ctx,
models.CtxSessionKey, userSession)
if err := cacheSetSession(sessionToken,
userSession); err != nil {