aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo')
-rw-r--r--routers/web/repo/repo.go3
-rw-r--r--routers/web/repo/setting/collaboration.go2
-rw-r--r--routers/web/repo/setting/setting.go6
3 files changed, 5 insertions, 6 deletions
diff --git a/routers/web/repo/repo.go b/routers/web/repo/repo.go
index f5e59b0357..4b017f61c4 100644
--- a/routers/web/repo/repo.go
+++ b/routers/web/repo/repo.go
@@ -11,7 +11,6 @@ import (
"slices"
"strings"
- "code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/db"
git_model "code.gitea.io/gitea/models/git"
"code.gitea.io/gitea/models/organization"
@@ -378,7 +377,7 @@ func Action(ctx *context.Context) {
}
func acceptOrRejectRepoTransfer(ctx *context.Context, accept bool) error {
- repoTransfer, err := models.GetPendingRepositoryTransfer(ctx, ctx.Repo.Repository)
+ repoTransfer, err := repo_model.GetPendingRepositoryTransfer(ctx, ctx.Repo.Repository)
if err != nil {
return err
}
diff --git a/routers/web/repo/setting/collaboration.go b/routers/web/repo/setting/collaboration.go
index cdf91edf4a..df7cc5e39b 100644
--- a/routers/web/repo/setting/collaboration.go
+++ b/routers/web/repo/setting/collaboration.go
@@ -32,7 +32,7 @@ func Collaboration(ctx *context.Context) {
}
ctx.Data["Collaborators"] = users
- teams, err := organization.GetRepoTeams(ctx, ctx.Repo.Repository)
+ teams, err := organization.GetRepoTeams(ctx, ctx.Repo.Repository.OwnerID, ctx.Repo.Repository.ID)
if err != nil {
ctx.ServerError("GetRepoTeams", err)
return
diff --git a/routers/web/repo/setting/setting.go b/routers/web/repo/setting/setting.go
index 717d7cbce1..f2169d8a79 100644
--- a/routers/web/repo/setting/setting.go
+++ b/routers/web/repo/setting/setting.go
@@ -788,7 +788,7 @@ func SettingsPost(ctx *context.Context) {
if err := repo_service.StartRepositoryTransfer(ctx, ctx.Doer, newOwner, repo, nil); err != nil {
if repo_model.IsErrRepoAlreadyExist(err) {
ctx.RenderWithErr(ctx.Tr("repo.settings.new_owner_has_same_repo"), tplSettingsOptions, nil)
- } else if models.IsErrRepoTransferInProgress(err) {
+ } else if repo_model.IsErrRepoTransferInProgress(err) {
ctx.RenderWithErr(ctx.Tr("repo.settings.transfer_in_progress"), tplSettingsOptions, nil)
} else if errors.Is(err, user_model.ErrBlockedUser) {
ctx.RenderWithErr(ctx.Tr("repo.settings.transfer.blocked_user"), tplSettingsOptions, nil)
@@ -814,9 +814,9 @@ func SettingsPost(ctx *context.Context) {
return
}
- repoTransfer, err := models.GetPendingRepositoryTransfer(ctx, ctx.Repo.Repository)
+ repoTransfer, err := repo_model.GetPendingRepositoryTransfer(ctx, ctx.Repo.Repository)
if err != nil {
- if models.IsErrNoPendingTransfer(err) {
+ if repo_model.IsErrNoPendingTransfer(err) {
ctx.Flash.Error("repo.settings.transfer_abort_invalid")
ctx.Redirect(repo.Link() + "/settings")
} else {