diff options
Diffstat (limited to 'routers/api/v1/user/star.go')
-rw-r--r-- | routers/api/v1/user/star.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/routers/api/v1/user/star.go b/routers/api/v1/user/star.go index 0937fd1903..47d3ed5079 100644 --- a/routers/api/v1/user/star.go +++ b/routers/api/v1/user/star.go @@ -18,13 +18,10 @@ func getStarredRepos(userID int64, private bool) ([]*api.Repository, error) { if err != nil { return nil, err } - user, err := models.GetUserByID(userID) - if err != nil { - return nil, err - } + repos := make([]*api.Repository, len(starredRepos)) for i, starred := range starredRepos { - access, err := models.AccessLevel(user, starred) + access, err := models.AccessLevel(userID, starred) if err != nil { return nil, err } |