Feat: add sse broker
This commit is contained in:
@ -6,6 +6,7 @@ import (
|
||||
"crypto/sha256"
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
"golias/models"
|
||||
"net/http"
|
||||
"time"
|
||||
)
|
||||
@ -91,9 +92,9 @@ func GetSession(next http.Handler) http.Handler {
|
||||
return
|
||||
}
|
||||
ctx := context.WithValue(r.Context(),
|
||||
"username", userSession.Username)
|
||||
models.CtxUsernameKey, userSession.Username)
|
||||
ctx = context.WithValue(r.Context(),
|
||||
"session", userSession)
|
||||
models.CtxSessionKey, userSession)
|
||||
if err := cacheSetSession(sessionToken,
|
||||
userSession); err != nil {
|
||||
msg := "failed to marshal user session"
|
||||
|
Reference in New Issue
Block a user