Skip to content

Commit

Permalink
fix(feeds): cron log is using incorrect posts.Total
Browse files Browse the repository at this point in the history
  • Loading branch information
neurosnap committed Dec 21, 2022
1 parent 0c03eb1 commit 34b19ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions feeds/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func (f *Fetcher) RunUser(user *db.User) error {
return err
}

if posts.Total > 0 {
if len(posts.Data) > 0 {
f.cfg.Logger.Infof("(%s) found (%d) feed posts", user.Name, posts.Total)
}

Expand Down Expand Up @@ -217,7 +217,7 @@ func (f *Fetcher) FetchAll(urls []string, lastDigest *time.Time) (string, error)

func (f *Fetcher) SendEmail(username, email, msg string) error {
if email == "" {
return fmt.Errorf("(%s) does not have an email associated with their account", username)
return fmt.Errorf("(%s) does not have an email associated with their feed post", username)
}

from := mail.NewEmail("team pico", f.cfg.Email)
Expand Down

0 comments on commit 34b19ea

Please sign in to comment.