summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-16 02:28:24 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-16 02:28:24 -0400
commit828c89de996c328bb3759d90be8a8a35b4d9cdc0 (patch)
treebc0c01f6fb9905892439e8b0eb3aaa76cd01eacf /models
parent631deb2e7d52d474469382c497878bde9083cb60 (diff)
downloadgitea-828c89de996c328bb3759d90be8a8a35b4d9cdc0.tar.gz
gitea-828c89de996c328bb3759d90be8a8a35b4d9cdc0.zip
Clean code
Diffstat (limited to 'models')
-rw-r--r--models/repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/repo.go b/models/repo.go
index 125abfc342..56e286ec4a 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -253,7 +253,7 @@ func GetRepositoryById(id int64) (repo *Repository, err error) {
// GetRepositories returns the list of repositories of given user.
func GetRepositories(user *User) ([]Repository, error) {
repos := make([]Repository, 0, 10)
- err := orm.Find(&repos, &Repository{OwnerId: user.Id})
+ err := orm.Desc("updated").Find(&repos, &Repository{OwnerId: user.Id})
return repos, err
}