Show username in Fever API logs

This commit is contained in:
Frédéric Guillot 2023-10-14 20:11:17 -07:00
parent fd69012357
commit 0fe347c87a

View file

@ -31,7 +31,7 @@ func (s *Storage) HasDuplicateGoogleReaderUsername(userID int64, googleReaderUse
func (s *Storage) UserByFeverToken(token string) (*model.User, error) {
query := `
SELECT
users.id, users.is_admin, users.timezone
users.id, users.username, users.is_admin, users.timezone
FROM
users
LEFT JOIN
@ -41,7 +41,7 @@ func (s *Storage) UserByFeverToken(token string) (*model.User, error) {
`
var user model.User
err := s.db.QueryRow(query, token).Scan(&user.ID, &user.IsAdmin, &user.Timezone)
err := s.db.QueryRow(query, token).Scan(&user.ID, &user.Username, &user.IsAdmin, &user.Timezone)
switch {
case err == sql.ErrNoRows:
return nil, nil