repos / pico

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

commit
fd3f672
parent
999ff1e
author
Eric Bower
date
2024-11-30 17:53:50 +0000 UTC
fix(analytics): remove created_at for site list
1 files changed,  +2, -2
M db/postgres/storage.go
+2, -2
 1@@ -1124,13 +1124,13 @@ func (me *PsqlDB) visitHost(opts *db.SummaryOpts) ([]*db.VisitUrl, error) {
 2 		host,
 3 		count(DISTINCT ip_address) as host_count
 4 	FROM analytics_visits
 5-	WHERE created_at >= $1 AND user_id = $2 AND path <> '' AND status <> 404
 6+	WHERE user_id = $1 AND path <> '' AND status <> 404
 7 	GROUP BY host
 8 	ORDER BY host_count DESC
 9 	LIMIT 10`
10 
11 	intervals := []*db.VisitUrl{}
12-	rs, err := me.Db.Query(topUrls, opts.Origin, opts.UserID)
13+	rs, err := me.Db.Query(topUrls, opts.UserID)
14 	if err != nil {
15 		return nil, err
16 	}