repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
34b19ea
parent
0c03eb1
author
Eric Bower
date
2022-12-21 01:52:47 +0000 UTC
fix(feeds): cron log is using incorrect `posts.Total`
1 files changed,  +2, -2
M feeds/cron.go
+2, -2
 1@@ -125,7 +125,7 @@ func (f *Fetcher) RunUser(user *db.User) error {
 2 		return err
 3 	}
 4 
 5-	if posts.Total > 0 {
 6+	if len(posts.Data) > 0 {
 7 		f.cfg.Logger.Infof("(%s) found (%d) feed posts", user.Name, posts.Total)
 8 	}
 9 
10@@ -217,7 +217,7 @@ func (f *Fetcher) FetchAll(urls []string, lastDigest *time.Time) (string, error)
11 
12 func (f *Fetcher) SendEmail(username, email, msg string) error {
13 	if email == "" {
14-		return fmt.Errorf("(%s) does not have an email associated with their account", username)
15+		return fmt.Errorf("(%s) does not have an email associated with their feed post", username)
16 	}
17 
18 	from := mail.NewEmail("team pico", f.cfg.Email)