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:
parent
27196589fb
commit
58acd1d5e3
10 changed files with 153 additions and 147 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue