diff options
Diffstat (limited to 'routers/api/v1/repo/issue_subscription.go')
-rw-r--r-- | routers/api/v1/repo/issue_subscription.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/routers/api/v1/repo/issue_subscription.go b/routers/api/v1/repo/issue_subscription.go index 274da966fd..0406edd207 100644 --- a/routers/api/v1/repo/issue_subscription.go +++ b/routers/api/v1/repo/issue_subscription.go @@ -190,9 +190,14 @@ func GetIssueSubscribers(ctx *context.APIContext) { return } - users, err := iwl.LoadWatchUsers() + var userIDs = make([]int64, 0, len(iwl)) + for _, iw := range iwl { + userIDs = append(userIDs, iw.UserID) + } + + users, err := models.GetUsersByIDs(userIDs) if err != nil { - ctx.Error(http.StatusInternalServerError, "LoadWatchUsers", err) + ctx.Error(http.StatusInternalServerError, "GetUsersByIDs", err) return } |