diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-11-17 23:17:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-17 23:17:31 +0800 |
commit | 5233051e64e90238bb7b6ddf9ecd1513e57bf8e9 (patch) | |
tree | 6e21565fd47954877bc14fd66f57d798c86e3300 /routers/web/repo/branch.go | |
parent | 750a8465f547e9f08a87612c75898d56b8ec1f88 (diff) | |
download | gitea-5233051e64e90238bb7b6ddf9ecd1513e57bf8e9.tar.gz gitea-5233051e64e90238bb7b6ddf9ecd1513e57bf8e9.zip |
Move some functions into services/repository (#17677)
Diffstat (limited to 'routers/web/repo/branch.go')
-rw-r--r-- | routers/web/repo/branch.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/web/repo/branch.go b/routers/web/repo/branch.go index 991beeace2..10557ff3db 100644 --- a/routers/web/repo/branch.go +++ b/routers/web/repo/branch.go @@ -171,7 +171,7 @@ func loadBranches(ctx *context.Context, skip, limit int) ([]*Branch, int) { return nil, 0 } - rawBranches, totalNumOfBranches, err := repo_module.GetBranches(ctx.Repo.Repository, skip, limit) + rawBranches, totalNumOfBranches, err := repo_service.GetBranches(ctx.Repo.Repository, skip, limit) if err != nil { log.Error("GetBranches: %v", err) ctx.ServerError("GetBranches", err) @@ -350,11 +350,11 @@ func CreateBranch(ctx *context.Context) { err = release_service.CreateNewTag(ctx.User, ctx.Repo.Repository, ctx.Repo.BranchName, form.NewBranchName, "") } } else if ctx.Repo.IsViewBranch { - err = repo_module.CreateNewBranch(ctx.User, ctx.Repo.Repository, ctx.Repo.BranchName, form.NewBranchName) + err = repo_service.CreateNewBranch(ctx.User, ctx.Repo.Repository, ctx.Repo.BranchName, form.NewBranchName) } else if ctx.Repo.IsViewTag { - err = repo_module.CreateNewBranchFromCommit(ctx.User, ctx.Repo.Repository, ctx.Repo.CommitID, form.NewBranchName) + err = repo_service.CreateNewBranchFromCommit(ctx.User, ctx.Repo.Repository, ctx.Repo.CommitID, form.NewBranchName) } else { - err = repo_module.CreateNewBranchFromCommit(ctx.User, ctx.Repo.Repository, ctx.Repo.BranchName, form.NewBranchName) + err = repo_service.CreateNewBranchFromCommit(ctx.User, ctx.Repo.Repository, ctx.Repo.BranchName, form.NewBranchName) } if err != nil { if models.IsErrTagAlreadyExists(err) { |