mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Clean oauth code
This commit is contained in:
		| @@ -714,9 +714,14 @@ func GetRepositoryById(id int64) (*Repository, error) { | ||||
| } | ||||
|  | ||||
| // GetRepositories returns the list of repositories of given user. | ||||
| func GetRepositories(user *User) ([]Repository, error) { | ||||
| func GetRepositories(user *User, private bool) ([]Repository, error) { | ||||
| 	repos := make([]Repository, 0, 10) | ||||
| 	err := orm.Desc("updated").Find(&repos, &Repository{OwnerId: user.Id}) | ||||
| 	sess := orm.Desc("updated") | ||||
| 	if !private { | ||||
| 		sess.Where("is_private=?", false) | ||||
| 	} | ||||
|  | ||||
| 	err := sess.Find(&repos, &Repository{OwnerId: user.Id}) | ||||
| 	return repos, err | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user