diff options
Diffstat (limited to 'routers/api/v1/user/watch.go')
-rw-r--r-- | routers/api/v1/user/watch.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/routers/api/v1/user/watch.go b/routers/api/v1/user/watch.go index 6a9ad670d0..2a94e219fe 100644 --- a/routers/api/v1/user/watch.go +++ b/routers/api/v1/user/watch.go @@ -31,14 +31,10 @@ func getWatchedRepos(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(watchedRepos)) for i, watched := range watchedRepos { - access, err := models.AccessLevel(user, watched) + access, err := models.AccessLevel(userID, watched) if err != nil { return nil, err } |