mirror of
https://github.com/miniflux/v2.git
synced 2025-09-30 19:22:11 +00:00
refactor: remove model.UserSessions
struct
This commit is contained in:
parent
84078c7c20
commit
f2976bff5d
3 changed files with 5 additions and 13 deletions
|
@ -13,7 +13,7 @@ import (
|
|||
)
|
||||
|
||||
// UserSessions returns the list of sessions for the given user.
|
||||
func (s *Storage) UserSessions(userID int64) (model.UserSessions, error) {
|
||||
func (s *Storage) UserSessions(userID int64) ([]model.UserSession, error) {
|
||||
query := `
|
||||
SELECT
|
||||
id,
|
||||
|
@ -33,7 +33,7 @@ func (s *Storage) UserSessions(userID int64) (model.UserSessions, error) {
|
|||
}
|
||||
defer rows.Close()
|
||||
|
||||
var sessions model.UserSessions
|
||||
var sessions []model.UserSession
|
||||
for rows.Next() {
|
||||
var session model.UserSession
|
||||
err := rows.Scan(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue