mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-20 05:00:01 +02:00
Fix unused Engine bugs (#1064)
This commit is contained in:
parent
50918084bb
commit
136e6beb0f
2 changed files with 4 additions and 4 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue