diff options
Diffstat (limited to 'internal/db/models.go')
-rw-r--r-- | internal/db/models.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/db/models.go b/internal/db/models.go index 73a8363f..f0e4d564 100644 --- a/internal/db/models.go +++ b/internal/db/models.go @@ -5,6 +5,7 @@ package db import ( + "context" "database/sql" "fmt" "os" @@ -208,7 +209,7 @@ type Statistic struct { } } -func GetStatistic() (stats Statistic) { +func GetStatistic(ctx context.Context) (stats Statistic) { stats.Counter.User = CountUsers() stats.Counter.Org = CountOrganizations() stats.Counter.PublicKey, _ = x.Count(new(PublicKey)) @@ -223,7 +224,7 @@ func GetStatistic() (stats Statistic) { stats.Counter.Follow, _ = x.Count(new(Follow)) stats.Counter.Mirror, _ = x.Count(new(Mirror)) stats.Counter.Release, _ = x.Count(new(Release)) - stats.Counter.LoginSource = LoginSources.Count() + stats.Counter.LoginSource = LoginSources.Count(ctx) stats.Counter.Webhook, _ = x.Count(new(Webhook)) stats.Counter.Milestone, _ = x.Count(new(Milestone)) stats.Counter.Label, _ = x.Count(new(Label)) |