Skip to content

Commit

Permalink
use IsWatching until refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 committed Nov 1, 2019
1 parent fb325d7 commit bd3c737
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions routers/api/v1/repo/issue_subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,13 @@ func GetIssueSubscribers(ctx *context.APIContext, form api.User) {

var subscribers []*api.User
for _, s := range iw {
user, err := models.GetUserByID(s.UserID)
if err != nil {
continue
if s.IsWatching {
user, err := models.GetUserByID(s.UserID)
if err != nil {
continue
}
subscribers = append(subscribers, user.APIFormat())
}
subscribers = append(subscribers, user.APIFormat())
}

ctx.JSON(200, subscribers)
Expand Down

0 comments on commit bd3c737

Please sign in to comment.