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/api | |
parent | 750a8465f547e9f08a87612c75898d56b8ec1f88 (diff) | |
download | gitea-5233051e64e90238bb7b6ddf9ecd1513e57bf8e9.tar.gz gitea-5233051e64e90238bb7b6ddf9ecd1513e57bf8e9.zip |
Move some functions into services/repository (#17677)
Diffstat (limited to 'routers/api')
-rw-r--r-- | routers/api/v1/repo/branch.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/repo/branch.go b/routers/api/v1/repo/branch.go index c57075e3b8..2e08b56826 100644 --- a/routers/api/v1/repo/branch.go +++ b/routers/api/v1/repo/branch.go @@ -176,7 +176,7 @@ func CreateBranch(ctx *context.APIContext) { opt.OldBranchName = ctx.Repo.Repository.DefaultBranch } - err := repo_module.CreateNewBranch(ctx.User, ctx.Repo.Repository, opt.OldBranchName, opt.BranchName) + err := repo_service.CreateNewBranch(ctx.User, ctx.Repo.Repository, opt.OldBranchName, opt.BranchName) if err != nil { if models.IsErrBranchDoesNotExist(err) { @@ -257,7 +257,7 @@ func ListBranches(ctx *context.APIContext) { listOptions := utils.GetListOptions(ctx) skip, _ := listOptions.GetStartEnd() - branches, totalNumOfBranches, err := repo_module.GetBranches(ctx.Repo.Repository, skip, listOptions.PageSize) + branches, totalNumOfBranches, err := repo_service.GetBranches(ctx.Repo.Repository, skip, listOptions.PageSize) if err != nil { ctx.Error(http.StatusInternalServerError, "GetBranches", err) return |