Commit cf012c4
Eric Bower
·
2025-09-07 15:43:46 -0400 EDT
parent 0a997c5
fix(feeds): last digest can be nil
1 files changed,
+6,
-1
+6,
-1
| ... | ... | @@ -86,11 +86,16 @@ func Middleware(dbpool db.DB, cfg *shared.ConfigSite) pssh.SSHServerMiddleware { | |
| 86 | 86 | } | |
| 87 | 87 | nd, _ := gronx.NextTickAfter(cron, DateToMin(time.Now()), true) | |
| 88 | 88 | nextDigest = nd.Format(time.RFC3339) | |
| 89 | + | last := post.Data.LastDigest | |
| 90 | + | lastStr := "never" | |
| 91 | + | if last != nil { | |
| 92 | + | lastStr = last.Format(time.RFC3339) | |
| 93 | + | } | |
| 89 | 94 | _, _ = fmt.Fprintf( | |
| 90 | 95 | writer, | |
| 91 | 96 | "%s\t%s\t%s\t%s\t%d/10\r\n", | |
| 92 | 97 | post.Filename, | |
| 93 | - | post.Data.LastDigest.Format(time.RFC3339), | |
| 98 | + | lastStr, | |
| 94 | 99 | nextDigest, | |
| 95 | 100 | cron, | |
| 96 | 101 | post.Data.Attempts, |