feat: post reshare enhancements

This commit is contained in:
Krispire Admin
2026-06-03 14:41:15 +05:30
parent 3f6b7b6636
commit 7f5b0fee11
9 changed files with 397 additions and 190 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ func (r *StatsRepo) Snapshot(ctx context.Context) (*StatsSnapshot, error) {
{`SELECT COUNT(*) FROM collections`, nil, &s.Collections},
{`SELECT COUNT(*) FROM collections WHERE is_public`, nil, &s.PublicCollections},
{`SELECT COUNT(*) FROM bookmarks`, nil, &s.Bookmarks},
{`SELECT COUNT(*) FROM post_reshares`, nil, &s.Reshares},
{`SELECT COUNT(*) FROM posts WHERE reshared_from_post_id IS NOT NULL`, nil, &s.Reshares},
{`SELECT COUNT(*) FROM feedback`, nil, &s.Feedback},
{`SELECT COUNT(*) FROM feedback WHERE created_at >= $1`, []any{sevenAgo}, &s.FeedbackLast7Days},
}