aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/transfer.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-12-10 10:46:31 +0800
committerGitHub <noreply@github.com>2022-12-10 10:46:31 +0800
commit68704532c28cf09db96c988291b2f82c5e615984 (patch)
treec6537092dc11054f96b202fdb957755ed116cd99 /routers/api/v1/repo/transfer.go
parent097d4e30b180eef30600beef2c08095e2571319c (diff)
downloadgitea-68704532c28cf09db96c988291b2f82c5e615984.tar.gz
gitea-68704532c28cf09db96c988291b2f82c5e615984.zip
Rename almost all Ctx functions (#22071)
Diffstat (limited to 'routers/api/v1/repo/transfer.go')
-rw-r--r--routers/api/v1/repo/transfer.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/api/v1/repo/transfer.go b/routers/api/v1/repo/transfer.go
index fb15566a4b..5154c5afa3 100644
--- a/routers/api/v1/repo/transfer.go
+++ b/routers/api/v1/repo/transfer.go
@@ -105,7 +105,7 @@ func Transfer(ctx *context.APIContext) {
oldFullname := ctx.Repo.Repository.FullName()
- if err := repo_service.StartRepositoryTransfer(ctx.Doer, newOwner, ctx.Repo.Repository, teams); err != nil {
+ if err := repo_service.StartRepositoryTransfer(ctx, ctx.Doer, newOwner, ctx.Repo.Repository, teams); err != nil {
if models.IsErrRepoTransferInProgress(err) {
ctx.Error(http.StatusConflict, "StartRepositoryTransfer", err)
return
@@ -207,7 +207,7 @@ func RejectTransfer(ctx *context.APIContext) {
}
func acceptOrRejectRepoTransfer(ctx *context.APIContext, accept bool) error {
- repoTransfer, err := models.GetPendingRepositoryTransfer(ctx.Repo.Repository)
+ repoTransfer, err := models.GetPendingRepositoryTransfer(ctx, ctx.Repo.Repository)
if err != nil {
if models.IsErrNoPendingTransfer(err) {
ctx.NotFound()
@@ -216,7 +216,7 @@ func acceptOrRejectRepoTransfer(ctx *context.APIContext, accept bool) error {
return err
}
- if err := repoTransfer.LoadAttributes(); err != nil {
+ if err := repoTransfer.LoadAttributes(ctx); err != nil {
return err
}
@@ -226,7 +226,7 @@ func acceptOrRejectRepoTransfer(ctx *context.APIContext, accept bool) error {
}
if accept {
- return repo_service.TransferOwnership(repoTransfer.Doer, repoTransfer.Recipient, ctx.Repo.Repository, repoTransfer.Teams)
+ return repo_service.TransferOwnership(ctx, repoTransfer.Doer, repoTransfer.Recipient, ctx.Repo.Repository, repoTransfer.Teams)
}
return models.CancelRepositoryTransfer(ctx.Repo.Repository)