Code convention

This commit is contained in:
Unknown 2014-05-24 15:28:31 -04:00
parent e33a104448
commit 80055bde86
11 changed files with 63 additions and 90 deletions

View file

@ -752,14 +752,14 @@ func GetRepositoryById(id int64) (*Repository, error) {
}
// GetRepositories returns a list of repositories of given user.
func GetRepositories(user *User, private bool) ([]*Repository, error) {
func GetRepositories(uid int64, private bool) ([]*Repository, error) {
repos := make([]*Repository, 0, 10)
sess := orm.Desc("updated")
if !private {
sess.Where("is_private=?", false)
}
err := sess.Find(&repos, &Repository{OwnerId: user.Id})
err := sess.Find(&repos, &Repository{OwnerId: uid})
return repos, err
}

View file

@ -237,7 +237,7 @@ func ChangeUserName(user *User, newUserName string) (err error) {
}
}
repos, err := GetRepositories(user, true)
repos, err := GetRepositories(user.Id, true)
if err != nil {
return err
}