diff options
author | JakobDev <jakobdev@gmx.de> | 2023-09-14 19:09:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-14 17:09:32 +0000 |
commit | 76659b1114153603050de810006e04a938e9dcb7 (patch) | |
tree | ed180213ca459bca51c44dbcc55fd3f9bc2d0460 /routers/private | |
parent | 0de09d3afcb5394cbd97e4a1c5609eb8b2acb6cf (diff) | |
download | gitea-76659b1114153603050de810006e04a938e9dcb7.tar.gz gitea-76659b1114153603050de810006e04a938e9dcb7.zip |
Reduce usage of `db.DefaultContext` (#27073)
Part of #27065
This reduces the usage of `db.DefaultContext`. I think I've got enough
files for the first PR. When this is merged, I will continue working on
this.
Considering how many files this PR affect, I hope it won't take to long
to merge, so I don't end up in the merge conflict hell.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'routers/private')
-rw-r--r-- | routers/private/default_branch.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/private/default_branch.go b/routers/private/default_branch.go index b15d6ba33a..a23e101e9d 100644 --- a/routers/private/default_branch.go +++ b/routers/private/default_branch.go @@ -29,7 +29,7 @@ func SetDefaultBranch(ctx *gitea_context.PrivateContext) { } } - if err := repo_model.UpdateDefaultBranch(ctx.Repo.Repository); err != nil { + if err := repo_model.UpdateDefaultBranch(ctx, ctx.Repo.Repository); err != nil { ctx.JSON(http.StatusInternalServerError, private.Response{ Err: fmt.Sprintf("Unable to set default branch on repository: %s/%s Error: %v", ownerName, repoName, err), }) |