1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

[refactor] Unify the export of user data via API (#15144)

* [refactor] unify how user data is exported via API

* test time via unix timestamp
This commit is contained in:
6543
2021-03-27 17:45:26 +01:00
committed by GitHub
parent f4d27498bd
commit 290cf75f93
26 changed files with 117 additions and 97 deletions

View File

@@ -50,7 +50,7 @@ func ListStargazers(ctx *context.APIContext) {
}
users := make([]*api.User, len(stargazers))
for i, stargazer := range stargazers {
users[i] = convert.ToUser(stargazer, ctx.IsSigned, ctx.User != nil && ctx.User.IsAdmin)
users[i] = convert.ToUser(stargazer, ctx.User)
}
ctx.JSON(http.StatusOK, users)
}