Fix unused Engine bugs (#1064)

This commit is contained in:
Ethan Koenig authored and Lunny Xiao committed 2017-02-27 10:16:35 +08:00
1 parent 50918084bb
commit 136e6beb0f
2 files changed
+4 -4

No files matched your search

+3 -3
View File
@@ -1734,15 +1734,15 @@ func GetUserMirrorRepositories(userID int64) ([]*Repository, error) {
}
func getRepositoryCount(e Engine, u *User) (int64, error) {
return x.Count(&Repository{OwnerID: u.ID})
return e.Count(&Repository{OwnerID: u.ID})
}
func getPublicRepositoryCount(e Engine, u *User) (int64, error) {
return x.Where("is_private = ?", false).Count(&Repository{OwnerID: u.ID})
return e.Where("is_private = ?", false).Count(&Repository{OwnerID: u.ID})
}
func getPrivateRepositoryCount(e Engine, u *User) (int64, error) {
return x.Where("is_private = ?", true).Count(&Repository{OwnerID: u.ID})
return e.Where("is_private = ?", true).Count(&Repository{OwnerID: u.ID})
}
// GetRepositoryCount returns the total number of repositories of user.