aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/issue_subscription.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/issue_subscription.go')
-rw-r--r--routers/api/v1/repo/issue_subscription.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/routers/api/v1/repo/issue_subscription.go b/routers/api/v1/repo/issue_subscription.go
index f0df0976fb..2bbd72299a 100644
--- a/routers/api/v1/repo/issue_subscription.go
+++ b/routers/api/v1/repo/issue_subscription.go
@@ -9,6 +9,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/context"
+ "code.gitea.io/gitea/modules/convert"
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/routers/api/v1/utils"
)
@@ -276,6 +277,10 @@ func GetIssueSubscribers(ctx *context.APIContext) {
ctx.Error(http.StatusInternalServerError, "GetUsersByIDs", err)
return
}
+ apiUsers := make([]*api.User, 0, len(users))
+ for i := range users {
+ apiUsers[i] = convert.ToUser(users[i], ctx.IsSigned, false)
+ }
- ctx.JSON(http.StatusOK, users.APIFormat())
+ ctx.JSON(http.StatusOK, apiUsers)
}