aboutsummaryrefslogtreecommitdiff
path: root/internal/route/repo/pull.go
diff options
context:
space:
mode:
authorJoe Chen <jc@unknwon.io>2022-11-05 23:33:05 +0800
committerGitHub <noreply@github.com>2022-11-05 23:33:05 +0800
commit5fb29db2db04bc128af410867f1f602320eb5d66 (patch)
tree9d0b86702d872f8f5ab7d0691e511c52f38fde34 /internal/route/repo/pull.go
parentb5d47b969258f3d644ad797b29901eb607f6b94f (diff)
refactor(db): migrate methods off and delete deprecated methods from `user.go` (#7231)
Diffstat (limited to 'internal/route/repo/pull.go')
-rw-r--r--internal/route/repo/pull.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/route/repo/pull.go b/internal/route/repo/pull.go
index c203266c..2429ff8b 100644
--- a/internal/route/repo/pull.go
+++ b/internal/route/repo/pull.go
@@ -71,7 +71,7 @@ func parseBaseRepository(c *context.Context) *db.Repository {
orgs, err := db.Orgs.List(
c.Req.Context(),
- db.ListOrgOptions{
+ db.ListOrgsOptions{
MemberID: c.User.ID,
IncludePrivateMembers: true,
},
@@ -466,7 +466,7 @@ func ParseCompareInfo(c *context.Context) (*db.User, *db.Repository, *git.Reposi
headBranch = headInfos[0]
} else if len(headInfos) == 2 {
- headUser, err = db.GetUserByName(headInfos[0])
+ headUser, err = db.Users.GetByUsername(c.Req.Context(), headInfos[0])
if err != nil {
c.NotFoundOrError(err, "get user by name")
return nil, nil, nil, nil, "", ""