diff --git a/session.go b/session.go index 7516d8a..ba3fdc6 100644 --- a/session.go +++ b/session.go @@ -60,11 +60,11 @@ func SessionWithConfig(config SessionConfig) Interceptor { } // SessionGet returns a named session. -func SessionGet(ctx *http.RequestCtx, name string) (interface{}, error) { +func SessionGet(ctx *http.RequestCtx, name string) (*session.Store, error) { store, ok := ctx.UserValue(key).(*session.Store) if !ok { return nil, fmt.Errorf("%s session store not found", key) } - return store.Get(name), nil + return store, nil }