Prevent saved items from being deleted

This commit is contained in:
Marcus Noble 2020-11-08 19:56:31 +00:00
parent 57e2176e03
commit 595b135316

View File

@ -61,7 +61,7 @@ func (fs *FeedStore) DeleteOldReadItems() {
t := time.Now() t := time.Now()
threshold := t.Add(-time.Hour * 24 * 7) threshold := t.Add(-time.Hour * 24 * 7)
fs.getDB().Table("items"). fs.getDB().Table("items").
Where("read = ? and created < ?", true, threshold). Where("save = ? and read = ? and created < ?", false, true, threshold).
Delete(Item{}) Delete(Item{})
} }