mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-05 23:44:22 +00:00
Use time since
This commit is contained in:
@@ -121,7 +121,8 @@ func (db *database) GetSystemStats() (*UserStats, error) {
|
|||||||
query = db.NewQuery().
|
query = db.NewQuery().
|
||||||
Select("COUNT(DISTINCT user_id)").
|
Select("COUNT(DISTINCT user_id)").
|
||||||
From("sessions").
|
From("sessions").
|
||||||
Where("created_at > datetime('now', '-30 days')")
|
Where("created_at >").
|
||||||
|
TimeSince(30)
|
||||||
err = db.QueryRow(query.String()).
|
err = db.QueryRow(query.String()).
|
||||||
Scan(&stats.ActiveUsers)
|
Scan(&stats.ActiveUsers)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user