mirror of
https://github.com/go-gitea/gitea
synced 2025-07-19 08:48:37 +00:00
Federation: return useful statistic information for nodeinfo (#19561)
Add statistic information for total user count, active user count, issue count and comment count for `/nodeinfo`
This commit is contained in:
@@ -49,7 +49,7 @@ type IssueByRepositoryCount struct {
|
||||
// GetStatistic returns the database statistics
|
||||
func GetStatistic() (stats Statistic) {
|
||||
e := db.GetEngine(db.DefaultContext)
|
||||
stats.Counter.User = user_model.CountUsers()
|
||||
stats.Counter.User = user_model.CountUsers(nil)
|
||||
stats.Counter.Org = organization.CountOrganizations()
|
||||
stats.Counter.PublicKey, _ = e.Count(new(asymkey_model.PublicKey))
|
||||
stats.Counter.Repo = repo_model.CountRepositories(true)
|
||||
|
Reference in New Issue
Block a user