Fix undefined ErrSessionExpired

Fixes: f07ab52632 ("Add docs")
This commit is contained in:
Simon Ser 2019-12-12 16:40:52 +01:00
parent f07ab52632
commit b24cc85fb1
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
2 changed files with 2 additions and 2 deletions

View file

@ -176,7 +176,7 @@ func New(e *echo.Echo, options *Options) error {
}
ctx.Session, err = ctx.Server.Sessions.get(cookie.Value)
if err == ErrSessionExpired {
if err == errSessionExpired {
ctx.SetSession(nil)
return ctx.Redirect(http.StatusFound, "/login")
} else if err != nil {

View file

@ -115,7 +115,7 @@ func (sm *SessionManager) get(token string) (*Session, error) {
session, ok := sm.sessions[token]
if !ok {
return nil, ErrSessionExpired
return nil, errSessionExpired
}
return session, nil
}