parent
f07ab52632
commit
b24cc85fb1
2 changed files with 2 additions and 2 deletions
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue