aboutsummaryrefslogtreecommitdiffhomepage
path: root/storage/icon.go
diff options
context:
space:
mode:
Diffstat (limited to 'storage/icon.go')
-rw-r--r--storage/icon.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/storage/icon.go b/storage/icon.go
index 3a3686d..aa9f99e 100644
--- a/storage/icon.go
+++ b/storage/icon.go
@@ -100,8 +100,8 @@ func (s *Storage) CreateIcon(icon *model.Icon) error {
}
// CreateFeedIcon creates an icon and associate the icon to the given feed.
-func (s *Storage) CreateFeedIcon(feed *model.Feed, icon *model.Icon) error {
- defer timer.ExecutionTime(time.Now(), fmt.Sprintf("[Storage:CreateFeedIcon] feedID=%d", feed.ID))
+func (s *Storage) CreateFeedIcon(feedID int64, icon *model.Icon) error {
+ defer timer.ExecutionTime(time.Now(), fmt.Sprintf("[Storage:CreateFeedIcon] feedID=%d", feedID))
err := s.IconByHash(icon)
if err != nil {
@@ -115,7 +115,7 @@ func (s *Storage) CreateFeedIcon(feed *model.Feed, icon *model.Icon) error {
}
}
- _, err = s.db.Exec(`INSERT INTO feed_icons (feed_id, icon_id) VALUES ($1, $2)`, feed.ID, icon.ID)
+ _, err = s.db.Exec(`INSERT INTO feed_icons (feed_id, icon_id) VALUES ($1, $2)`, feedID, icon.ID)
if err != nil {
return fmt.Errorf("unable to create feed icon: %v", err)
}