1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-05-11 05:55:29 +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:
6543
2022-05-02 15:35:45 +02:00
committed by GitHub
parent 509d811243
commit e2a3f3d259
11 changed files with 78 additions and 16 deletions

View File

@ -14,6 +14,7 @@ import (
"code.gitea.io/gitea/models/auth"
repo_model "code.gitea.io/gitea/models/repo"
"code.gitea.io/gitea/modules/cache"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
@ -247,6 +248,7 @@ func APIContexter() func(http.Handler) http.Handler {
Resp: NewResponse(w),
Data: map[string]interface{}{},
Locale: locale,
Cache: cache.GetCache(),
Repo: &Repository{
PullRequest: &PullRequest{},
},