mirror of
https://github.com/miniflux/v2.git
synced 2025-06-27 16:36:00 +00:00
Use feed ID instead of user ID to check entry URLs presence
This commit is contained in:
parent
1634e267b8
commit
f3fc8b7072
2 changed files with 4 additions and 4 deletions
|
@ -316,9 +316,9 @@ func (s *Storage) MarkCategoryAsRead(userID, categoryID int64, before time.Time)
|
|||
}
|
||||
|
||||
// EntryURLExists returns true if an entry with this URL already exists.
|
||||
func (s *Storage) EntryURLExists(userID int64, entryURL string) bool {
|
||||
func (s *Storage) EntryURLExists(feedID int64, entryURL string) bool {
|
||||
var result int
|
||||
query := `SELECT count(*) as c FROM entries WHERE user_id=$1 AND url=$2`
|
||||
s.db.QueryRow(query, userID, entryURL).Scan(&result)
|
||||
query := `SELECT count(*) as c FROM entries WHERE feed_id=$1 AND url=$2`
|
||||
s.db.QueryRow(query, feedID, entryURL).Scan(&result)
|
||||
return result >= 1
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue