aboutsummaryrefslogtreecommitdiffhomepage
path: root/storage
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2019-02-28 20:43:33 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net>2019-02-28 20:43:33 -0800
commitf3fc8b70721524867a3dac7d2bcb548b830c282a (patch)
treed82d6a29e09a5fc66df5f873e9a250b9267de9c7 /storage
parent1634e267b8fe33d2f74454fb43c471d224642a89 (diff)
Use feed ID instead of user ID to check entry URLs presence
Diffstat (limited to 'storage')
-rw-r--r--storage/entry.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/storage/entry.go b/storage/entry.go
index ec31843..811a207 100644
--- a/storage/entry.go
+++ b/storage/entry.go
@@ -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
}