1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2024-11-25 12:49:51 +01:00

Fix linting errors

This commit is contained in:
binwiederhier 2023-01-28 07:40:29 -05:00
parent 16c14bf709
commit b77920bb4b

View file

@ -406,6 +406,7 @@ func (a *Manager) CreateToken(userID, label string, expires time.Time) (*Token,
}, nil }, nil
} }
// Tokens returns all existing tokens for the user with the given user ID
func (a *Manager) Tokens(userID string) ([]*Token, error) { func (a *Manager) Tokens(userID string) ([]*Token, error) {
rows, err := a.db.Query(selectTokensQuery, userID) rows, err := a.db.Query(selectTokensQuery, userID)
if err != nil { if err != nil {
@ -425,6 +426,7 @@ func (a *Manager) Tokens(userID string) ([]*Token, error) {
return tokens, nil return tokens, nil
} }
// Token returns a specific token for a user
func (a *Manager) Token(userID, token string) (*Token, error) { func (a *Manager) Token(userID, token string) (*Token, error) {
rows, err := a.db.Query(selectTokenQuery, userID, token) rows, err := a.db.Query(selectTokenQuery, userID, token)
if err != nil { if err != nil {