refactor(handler/sessionrefresh): use found session key instead of looking up key again

This commit is contained in:
Trong Huu Nguyen
2023-01-03 14:29:39 +01:00
parent ae31267fd1
commit 67d3977cc1

View File

@@ -23,7 +23,7 @@ func Handler(src Source, w http.ResponseWriter, r *http.Request) {
return
}
data, err := src.GetSessions().Get(r)
data, err := src.GetSessions().GetForKey(r, key)
if err != nil {
switch {
case errors.Is(err, session.ErrKeyNotFound), errors.Is(err, session.ErrSessionInactive):