diff options
author | Joe Chen <jc@unknwon.io> | 2023-02-05 16:28:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-05 16:28:47 +0800 |
commit | 7ff09cf35916cad50495c26a47f4c0d05487e24e (patch) | |
tree | dc4516234c3a8e72051e2ab1674adb7e7c32c3cc /internal/route/user/home.go | |
parent | 3c43b9b21c74faf60d62b2cbf2ee89e9ada37f0c (diff) |
refactor(db): migrate methods off `user.go` (#7336)
Diffstat (limited to 'internal/route/user/home.go')
-rw-r--r-- | internal/route/user/home.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/route/user/home.go b/internal/route/user/home.go index f9f1b7b1..4521f511 100644 --- a/internal/route/user/home.go +++ b/internal/route/user/home.go @@ -125,9 +125,9 @@ func Dashboard(c *context.Context) { // Only user can have collaborative repositories. if !ctxUser.IsOrganization() { - collaborateRepos, err := c.User.GetAccessibleRepositories(conf.UI.User.RepoPagingNum) + collaborateRepos, err := db.Repos.GetByCollaboratorID(c.Req.Context(), c.User.ID, conf.UI.User.RepoPagingNum, "updated_unix DESC") if err != nil { - c.Error(err, "get accessible repositories") + c.Error(err, "get accessible repositories by collaborator") return } else if err = db.RepositoryList(collaborateRepos).LoadAttributes(); err != nil { c.Error(err, "load attributes") |