summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/star.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/star.go')
-rw-r--r--routers/api/v1/repo/star.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/api/v1/repo/star.go b/routers/api/v1/repo/star.go
index 046142252b..1b2ef0b027 100644
--- a/routers/api/v1/repo/star.go
+++ b/routers/api/v1/repo/star.go
@@ -8,6 +8,7 @@ import (
"code.gitea.io/gitea/modules/context"
api "code.gitea.io/gitea/modules/structs"
+ "code.gitea.io/gitea/routers/api/v1/convert"
)
// ListStargazers list a repository's stargazers
@@ -38,7 +39,7 @@ func ListStargazers(ctx *context.APIContext) {
}
users := make([]*api.User, len(stargazers))
for i, stargazer := range stargazers {
- users[i] = stargazer.APIFormat()
+ users[i] = convert.ToUser(stargazer, ctx.IsSigned, ctx.User != nil && ctx.User.IsAdmin)
}
ctx.JSON(200, users)
}