v55: fix item_count to query actual DB count

This commit is contained in:
primal
2026-01-30 17:05:07 -05:00
parent 406f9397c2
commit c5ad66ee81
3 changed files with 9 additions and 7 deletions
+2 -1
View File
@@ -58,7 +58,8 @@ func (c *Crawler) handleAPIFeedInfo(w http.ResponseWriter, r *http.Request) {
discovered_at, last_crawled_at, next_crawl_at, last_build_date,
ttl_minutes, update_period, update_freq,
status, error_count, last_error,
item_count, avg_post_freq_hrs, oldest_item_date, newest_item_date,
(SELECT COUNT(*) FROM items WHERE feed_url = feeds.url) as item_count,
avg_post_freq_hrs, oldest_item_date, newest_item_date,
publish_status, publish_account
FROM feeds WHERE url = $1
`, feedURL).Scan(