mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-28 12:00:01 +02:00
Use context parameter in services/repository (#23186)
Use context parameter in `services/repository`. And use `cache.WithCacheContext(ctx)` to generate push action history feeds. Fix #23160
This commit is contained in:
parent
cbbd3726b4
commit
04347eb810
29 changed files with 102 additions and 100 deletions
|
@ -118,7 +118,7 @@ func DeleteBranch(ctx *context.APIContext) {
|
|||
|
||||
branchName := ctx.Params("*")
|
||||
|
||||
if err := repo_service.DeleteBranch(ctx.Doer, ctx.Repo.Repository, ctx.Repo.GitRepo, branchName); err != nil {
|
||||
if err := repo_service.DeleteBranch(ctx, ctx.Doer, ctx.Repo.Repository, ctx.Repo.GitRepo, branchName); err != nil {
|
||||
switch {
|
||||
case git.IsErrBranchNotExist(err):
|
||||
ctx.NotFound(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue