1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

Rename sessions table to user_sessions

This commit is contained in:
Frédéric Guillot 2017-12-16 12:15:33 -08:00
parent 27196589fb
commit 58acd1d5e3
10 changed files with 153 additions and 147 deletions

View file

@ -55,13 +55,13 @@ func (s *SessionMiddleware) isPublicRoute(r *http.Request) bool {
}
}
func (s *SessionMiddleware) getSessionFromCookie(r *http.Request) *model.Session {
func (s *SessionMiddleware) getSessionFromCookie(r *http.Request) *model.UserSession {
sessionCookie, err := r.Cookie("sessionID")
if err == http.ErrNoCookie {
return nil
}
session, err := s.store.SessionByToken(sessionCookie.Value)
session, err := s.store.UserSessionByToken(sessionCookie.Value)
if err != nil {
logger.Error("[SessionMiddleware] %v", err)
return nil