mirror of
https://github.com/miniflux/v2.git
synced 2025-08-16 18:01:37 +00:00
refactor(internal): fix doc comments
This commit is contained in:
parent
5e3bba9ae1
commit
7c1602c2c0
5 changed files with 6 additions and 8 deletions
|
@ -14,7 +14,7 @@ import (
|
||||||
"github.com/go-webauthn/webauthn/webauthn"
|
"github.com/go-webauthn/webauthn/webauthn"
|
||||||
)
|
)
|
||||||
|
|
||||||
// handle marshalling / unmarshalling session data
|
// WebAuthnSession handles marshalling / unmarshalling session data
|
||||||
type WebAuthnSession struct {
|
type WebAuthnSession struct {
|
||||||
*webauthn.SessionData
|
*webauthn.SessionData
|
||||||
}
|
}
|
||||||
|
|
|
@ -236,8 +236,8 @@ func (s *Storage) RemoveCategory(userID, categoryID int64) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// delete the given categories, replacing those categories with the user's first
|
// RemoveAndReplaceCategoriesByName deletes the given categories, replacing those categories with the user's first
|
||||||
// category on affected feeds
|
// category on affected feeds.
|
||||||
func (s *Storage) RemoveAndReplaceCategoriesByName(userid int64, titles []string) error {
|
func (s *Storage) RemoveAndReplaceCategoriesByName(userid int64, titles []string) error {
|
||||||
tx, err := s.db.Begin()
|
tx, err := s.db.Begin()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -155,7 +155,6 @@ func (s *Storage) createEntry(tx *sql.Tx, entry *model.Entry) error {
|
||||||
&entry.CreatedAt,
|
&entry.CreatedAt,
|
||||||
&entry.ChangedAt,
|
&entry.ChangedAt,
|
||||||
)
|
)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf(`store: unable to create entry %q (feed #%d): %v`, entry.URL, entry.FeedID, err)
|
return fmt.Errorf(`store: unable to create entry %q (feed #%d): %v`, entry.URL, entry.FeedID, err)
|
||||||
}
|
}
|
||||||
|
@ -208,7 +207,6 @@ func (s *Storage) updateEntry(tx *sql.Tx, entry *model.Entry) error {
|
||||||
entry.Hash,
|
entry.Hash,
|
||||||
pq.Array(entry.Tags),
|
pq.Array(entry.Tags),
|
||||||
).Scan(&entry.ID)
|
).Scan(&entry.ID)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf(`store: unable to update entry %q: %v`, entry.URL, err)
|
return fmt.Errorf(`store: unable to update entry %q: %v`, entry.URL, err)
|
||||||
}
|
}
|
||||||
|
@ -421,7 +419,7 @@ func (s *Storage) SetEntriesStatusCount(userID int64, entryIDs []int64, status s
|
||||||
return visible, nil
|
return visible, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetEntriesBookmarked update the bookmarked state for the given list of entries.
|
// SetEntriesBookmarkedState updates the bookmarked state for the given list of entries.
|
||||||
func (s *Storage) SetEntriesBookmarkedState(userID int64, entryIDs []int64, starred bool) error {
|
func (s *Storage) SetEntriesBookmarkedState(userID int64, entryIDs []int64, starred bool) error {
|
||||||
query := `UPDATE entries SET starred=$1, changed_at=now() WHERE user_id=$2 AND id=ANY($3)`
|
query := `UPDATE entries SET starred=$1, changed_at=now() WHERE user_id=$2 AND id=ANY($3)`
|
||||||
result, err := s.db.Exec(query, starred, userID, pq.Array(entryIDs))
|
result, err := s.db.Exec(query, starred, userID, pq.Array(entryIDs))
|
||||||
|
|
|
@ -157,7 +157,7 @@ func (s *Storage) FeedsWithCounters(userID int64) (model.Feeds, error) {
|
||||||
return getFeedsSorted(builder)
|
return getFeedsSorted(builder)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return read and unread count.
|
// FetchCounters returns read and unread count.
|
||||||
func (s *Storage) FetchCounters(userID int64) (model.FeedCounters, error) {
|
func (s *Storage) FetchCounters(userID int64) (model.FeedCounters, error) {
|
||||||
builder := NewFeedQueryBuilder(s, userID)
|
builder := NewFeedQueryBuilder(s, userID)
|
||||||
builder.WithCounters()
|
builder.WithCounters()
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
"miniflux.app/v2/internal/model"
|
"miniflux.app/v2/internal/model"
|
||||||
)
|
)
|
||||||
|
|
||||||
// handle storage of webauthn credentials
|
// AddWebAuthnCredential handles storage of webauthn credentials.
|
||||||
func (s *Storage) AddWebAuthnCredential(userID int64, handle []byte, credential *webauthn.Credential) error {
|
func (s *Storage) AddWebAuthnCredential(userID int64, handle []byte, credential *webauthn.Credential) error {
|
||||||
query := `
|
query := `
|
||||||
INSERT INTO webauthn_credentials
|
INSERT INTO webauthn_credentials
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue